[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 GitHub
parent bb6613888a
commit 196f507d3b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 0 deletions

View File

@ -13,6 +13,7 @@ Emulation fixes:
- GBA BIOS: Fix clobbering registers with word-sized CpuSet
- GBA Video: Disable BG target 1 blending when OBJ blending (fixes mgba.io/i/2722)
Other fixes:
- mGUI: Fix cases where an older save state screenshot would be shown. (fixes mgba.io/i/2183)
- Qt: Fix savestate preview sizes with different scales (fixes mgba.io/i/2560)
Misc:
- Core: Handle relative paths for saves, screenshots, etc consistently (fixes mgba.io/i/2826)

View File

@ -656,6 +656,9 @@ void mGUIRun(struct mGUIRunner* runner, const char* path) {
runner->core->reset(runner->core);
break;
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);
break;
case RUNNER_LOAD_STATE: