mirror of https://github.com/mgba-emu/mgba.git
SDL: Fix game crash check
This commit is contained in:
parent
10fe4a743c
commit
35b5626053
1
CHANGES
1
CHANGES
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue