-
-
Notifications
You must be signed in to change notification settings - Fork 794
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You also need to update _tryAutosave
to mark the screenshot as invalid if the ID is 0.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You missed my comment about _tryAutosave it seems.
Oops... my bad for the mistakes there! On it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One last thing: since this is a user-reported bug with visible changes, please add an entry to the CHANGES file in the "Other fixes" section, using the mGUI prefix. Changes are sorted alphabetically by section then by when they were added, so if there are other mGUI changes it goes at the bottom of those, but otherwise it goes in alphabetically between the other entries.
src/feature/gui/gui-runner.c
Outdated
@@ -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. |
There was a problem hiding this comment.
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:
// 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. |
Thanks! Hopefully I updated the |
… cursor over other savestates (#2929)
Fixes #2183.
Hi, this is my first PR and @endrift may remember me asking a question or two on the Discord server.
The change itself is quite small but I'll explain it anyways: extend the
SCREENSHOT_*
enums in thegui-runner.c
file to include aSCREENSHOT_STALE
. This is distinct fromSCREENSHOT_INVALID
because we do not want to just draw the current frame onto the background, we want to draw the actual save state screenshot PNG. This is a case that I considered to be equivalent to the!= SCREENSHOT_INVALID
case in terms of handling, since we basically just want to reload the new PNG image bytes into the background buffer.P.S.
CONTRIBUTING.md
states that my commit messages should be tagged with their relevant components, but I am not familiar enough with this codebase to be know which components I'm touching. I didn't see any components in the document referring tomGUI
.