Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 9 commits into from
May 23, 2023
3 changes: 3 additions & 0 deletions src/feature/gui/gui-runner.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 will re-draw to the new save state's screenshot.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This phrasing is a bit funky. Not super important, but I might change it a bit like so:

Suggested change
// Therefore, mark it as stale, so that at draw time, we will re-draw to the new save state's screenshot.
// 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:
Expand Down