diff --git a/src/core/autotracker.h b/src/core/autotracker.h index d0dfc8dc..972d5dad 100644 --- a/src/core/autotracker.h +++ b/src/core/autotracker.h @@ -178,9 +178,13 @@ class AutoTracker final : public LuaInterface{ return State::Unavailable; } - bool isAnyConnected() + bool isAnyMemoryConnected() { for (int index = 0; index < (int)_state.size(); ++index) { + if (_ap && _backendIndex[_ap] == index) + continue; // AP doesn't have memory + if (_uat && _backendIndex[_uat] == index) + continue; // UAT doesn't have memory if (getState(index) >= State::ConsoleConnected) return true; } diff --git a/src/core/scripthost.cpp b/src/core/scripthost.cpp index a2fb6d29..427406b0 100644 --- a/src/core/scripthost.cpp +++ b/src/core/scripthost.cpp @@ -561,7 +561,7 @@ void ScriptHost::resetWatches() void ScriptHost::runMemoryWatchCallbacks() { - if (!_autoTracker || !_autoTracker->isAnyConnected()) + if (!_autoTracker || !_autoTracker->isAnyMemoryConnected()) return; // we need to run callbacks because the autotracker changed some cache