From 59edaa3f89f4065e89904e55f3cd19c666d82c3a Mon Sep 17 00:00:00 2001 From: Rodrigo Alfonso Date: Sat, 14 Sep 2024 04:51:02 -0300 Subject: [PATCH] Fixing potential issues when using LINK_WIRELESS_ENABLE_NESTED_IRQ and low timer intervals --- lib/LinkWireless.hpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/LinkWireless.hpp b/lib/LinkWireless.hpp index 5712cb9..67f8576 100644 --- a/lib/LinkWireless.hpp +++ b/lib/LinkWireless.hpp @@ -961,7 +961,7 @@ class LinkWireless { bool acceptCalled = false; bool pingSent = false; #ifdef LINK_WIRELESS_USE_SEND_RECEIVE_LATCH - bool sendReceiveLatch = false; + bool sendReceiveLatch = false; // true = send ; false = receive bool shouldWaitForServer = false; #endif @@ -1055,6 +1055,7 @@ class LinkWireless { #ifdef LINK_WIRELESS_PUT_ISR_IN_IWRAM #ifdef LINK_WIRELESS_ENABLE_NESTED_IRQ void irqEnd() { + Link::_REG_IME = 0; interrupt = false; LINK_WIRELESS_BARRIER; if (pendingVBlank) {