diff --git a/CHANGES b/CHANGES index 0010d8000..7e855cb6c 100644 --- a/CHANGES +++ b/CHANGES @@ -4,6 +4,7 @@ Emulation fixes: - GBA Memory: Mark Famicom Mini games 22 through 28 as non-mirroring Other fixes: - CMake: Fix build with downstream minizip that exports incompatible symbols + - Core: Fix threading improperly setting paused state while interrupted - Core: Fix thread unsafety issue when dispatching code to a thread - Debugger: Close trace log when done tracing - Qt: Fix running proxied video if it gets pushed to the main thread diff --git a/src/core/thread.c b/src/core/thread.c index d266ca4a8..cf42e260c 100644 --- a/src/core/thread.c +++ b/src/core/thread.c @@ -564,7 +564,10 @@ void mCoreThreadTogglePause(struct mCoreThread* threadContext) { void mCoreThreadPauseFromThread(struct mCoreThread* threadContext) { bool frameOn = true; MutexLock(&threadContext->impl->stateMutex); - if (threadContext->impl->state == THREAD_RUNNING || (threadContext->impl->interruptDepth && threadContext->impl->savedState == THREAD_RUNNING)) { + if (threadContext->impl->interruptDepth && threadContext->impl->savedState == THREAD_RUNNING) { + threadContext->impl->savedState = THREAD_PAUSING; + frameOn = false; + } else if (threadContext->impl->state == THREAD_RUNNING) { threadContext->impl->state = THREAD_PAUSING; frameOn = false; }