SDL: Fix game crash check

This commit is contained in:
Vicki Pfau 2017-04-02 16:47:46 -07:00
parent 10fe4a743c
commit 35b5626053
2 changed files with 5 additions and 5 deletions

View File

@ -31,6 +31,7 @@ Bugfixes:
- Qt: Fix linking after some windows have been closed
- GBA Video: Fix wrong palette on 256-color sprites in OBJWIN
- Windows: Fix VDir.rewind
- SDL: Fix game crash check
Misc:
- SDL: Remove scancode key input
- GBA Video: Clean up unused timers

View File

@ -194,6 +194,10 @@ int mSDLRun(struct mSDLRenderer* renderer, struct mArguments* args) {
if (mCoreThreadStart(&thread)) {
renderer->runloop(renderer, &thread);
mSDLPauseAudio(&renderer->audio);
if (mCoreThreadHasCrashed(&thread)) {
didFail = true;
printf("The game crashed!\n");
}
mCoreThreadJoin(&thread);
} else {
didFail = true;
@ -204,11 +208,6 @@ int mSDLRun(struct mSDLRenderer* renderer, struct mArguments* args) {
mSDLResumeScreensaver(&renderer->events);
mSDLSetScreensaverSuspendable(&renderer->events, false);
#endif
if (mCoreThreadHasCrashed(&thread)) {
didFail = true;
printf("The game crashed!\n");
}
}
renderer->core->unloadROM(renderer->core);
return didFail;