mirror of https://github.com/mgba-emu/mgba.git
Core: Fix threading improperly setting paused state while interrupted
This commit is contained in:
parent
a268eb7175
commit
f05ba8a35b
1
CHANGES
1
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
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue