GBA Thread: Allow halted games to exit cleanly

This commit is contained in:
Jeffrey Pfau 2014-12-16 22:36:46 -08:00
parent 43b0d070b8
commit 9c1ec8c96d
2 changed files with 2 additions and 0 deletions

View File

@ -5,6 +5,7 @@ Features:
Bugfixes: Bugfixes:
- Qt: Fix issue with set frame sizes being the wrong height - Qt: Fix issue with set frame sizes being the wrong height
- Qt: Fix emulator crashing when full screen if a game is not running - Qt: Fix emulator crashing when full screen if a game is not running
- GBA Thread: Allow halted games to exit cleanly
Misc: Misc:
- Qt: Disable sync to video by default - Qt: Disable sync to video by default

View File

@ -357,6 +357,7 @@ void GBAThreadEnd(struct GBAThread* threadContext) {
threadContext->debugger->state = DEBUGGER_EXITING; threadContext->debugger->state = DEBUGGER_EXITING;
} }
threadContext->state = THREAD_EXITING; threadContext->state = THREAD_EXITING;
threadContext->gba->cpu->halted = false;
ConditionWake(&threadContext->stateCond); ConditionWake(&threadContext->stateCond);
MutexUnlock(&threadContext->stateMutex); MutexUnlock(&threadContext->stateMutex);
MutexLock(&threadContext->sync.audioBufferMutex); MutexLock(&threadContext->sync.audioBufferMutex);