Core: Fix the runloop resuming after a game has crashed (fixes #2451)

This commit is contained in:
Vicki Pfau 2022-02-18 22:09:14 -08:00
parent 751ab434f4
commit ad00b2f883
3 changed files with 6 additions and 4 deletions

View File

@ -35,6 +35,7 @@ Emulation fixes:
Other fixes:
- 3DS: Ensure writes update file modification time (fixes mgba.io/i/2444)
- Core: Don't attempt to restore rewind diffs past start of rewind
- Core: Fix the runloop resuming after a game has crashed (fixes mgba.io/i/2451)
- FFmpeg: Fix crash when encoding audio with some containers
- FFmpeg: Fix GIF recording (fixes mgba.io/i/2393)
- GB: Fix temporary saves

View File

@ -54,14 +54,15 @@ enum mCoreThreadState {
mTHREAD_INTERRUPTED,
mTHREAD_PAUSED,
mTHREAD_MIN_WAITING = mTHREAD_INTERRUPTED,
mTHREAD_CRASHED,
mTHREAD_MAX_WAITING = mTHREAD_PAUSED,
mTHREAD_INTERRUPTING,
mTHREAD_EXITING,
mTHREAD_SHUTDOWN
mTHREAD_SHUTDOWN,
mTHREAD_MIN_WAITING = mTHREAD_INTERRUPTED,
mTHREAD_MAX_WAITING = mTHREAD_CRASHED
};
enum mCoreThreadRequest {

View File

@ -468,7 +468,7 @@ bool mCoreThreadIsActive(struct mCoreThread* threadContext) {
if (!threadContext->impl) {
return false;
}
return threadContext->impl->state >= mTHREAD_RUNNING && threadContext->impl->state < mTHREAD_EXITING;
return threadContext->impl->state >= mTHREAD_RUNNING && threadContext->impl->state < mTHREAD_EXITING && threadContext->impl->state != mTHREAD_CRASHED;
}
void mCoreThreadInterrupt(struct mCoreThread* threadContext) {