[UI bug] mGBA doesn't update savestate screenshots until you move the cursor over other savestates (#2929)

This commit is contained in:
May 2023-05-23 18:16:46 -04:00 committed by Vicki Pfau
parent 97162280f9
commit d99f7b9912
2 changed files with 5 additions and 0 deletions

View File

@ -4,6 +4,8 @@ Emulation fixes:
- GB I/O: Read back proper SVBK value after writing 0 (fixes mgba.io/i/2921) - GB I/O: Read back proper SVBK value after writing 0 (fixes mgba.io/i/2921)
- GB SIO: Disabling SIO should cancel pending transfers (fixes mgba.io/i/2537) - GB SIO: Disabling SIO should cancel pending transfers (fixes mgba.io/i/2537)
- GBA BIOS: Fix clobbering registers with word-sized CpuSet - GBA BIOS: Fix clobbering registers with word-sized CpuSet
Other fixes:
- mGUI: Fix cases where an older save state screenshot would be shown (fixes mgba.io/i/2183)
0.10.2: (2023-04-23) 0.10.2: (2023-04-23)
Emulation fixes: Emulation fixes:

View File

@ -648,6 +648,9 @@ void mGUIRun(struct mGUIRunner* runner, const char* path) {
runner->core->reset(runner->core); runner->core->reset(runner->core);
break; break;
case RUNNER_SAVE_STATE: case RUNNER_SAVE_STATE:
// If we are saving state, then the screenshot stored for the state previously should no longer be considered up-to-date.
// Therefore, mark it as stale so that at draw time we load the new save state's screenshot.
((struct mGUIBackground*) stateSaveMenu.background)->screenshotId |= SCREENSHOT_INVALID;
mCoreSaveState(runner->core, item->data.v.u >> 16, SAVESTATE_SCREENSHOT | SAVESTATE_SAVEDATA | SAVESTATE_RTC | SAVESTATE_METADATA); mCoreSaveState(runner->core, item->data.v.u >> 16, SAVESTATE_SCREENSHOT | SAVESTATE_SAVEDATA | SAVESTATE_RTC | SAVESTATE_METADATA);
break; break;
case RUNNER_LOAD_STATE: case RUNNER_LOAD_STATE: