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

GUI -> Savestates panel ...query: path resolution, .uss filenaming, other... #1545

Closed
giantclambake opened this issue Dec 22, 2024 · 1 comment · Fixed by #1547
Closed

GUI -> Savestates panel ...query: path resolution, .uss filenaming, other... #1545

giantclambake opened this issue Dec 22, 2024 · 1 comment · Fixed by #1547
Assignees
Labels

Comments

@giantclambake
Copy link

// I've been testing .uss file handling/loading and so related...and found some things...

Test 1;

amiberry "Stunt Car Racer (1989)(Micro Style).adf" //direct-loads floppy image, wait for game bootsplash

F12 -> Savestates panel....

ex

Note the text "No Savestate found" ....in contradiction to the image of a savestate being found ;)

Cause: I changed the Save State files: path to be savestate_dir=/home/gcb/Desktop

Note: I did not change the Screenshots: path ....reason: to me "Save State files:" encompasses all files pertaining to save states.

If I look into the 'default' savestate path...

ls ~/.local/share/amiberry/savestates/
 default-4.uss              MegaAGS-1.uss
 dpaint-2.uss              'Stunt Car Racer (1989)(Micro Style).uss'
 Frontier_v1.3_CD32-4.uss

....clearly, a .uss does exist that's associated with this titles, but the current savestate path does not...

ls ~/Desktop/*.uss
/home/gcb/Desktop/AceBall_v1.0_Pl_AGA-13.uss
/home/gcb/Desktop/Apidya_v2.05_Audios_2465-14.uss
/home/gcb/Desktop/default-12.uss
/home/gcb/Desktop/Frontier_v1.3_CD32-4.uss
/home/gcb/Desktop/StuntCarRacerTNT_v1.3-12.uss

...so for whatever reason, the GUI decided to display the image, even though the actual .uss is not in $savestate_dir

ls ~/.local/share/amiberry/screenshots/
 AceBall_v1.0_Pl_AGA-13.png        dpaint-2.png
 amikit12-3.png                    Frontier_v1.3_CD32-4.png
 Apidya_v2.05_Audios_2465-14.png   MegaAGS-1.png
 default-12.png                   'Stunt Car Racer (1989)(Micro Style).png' <<----
 default-4.png                     StuntCarRacerTNT_v1.3-12.png

It should be said, the purpose of setting savestate_dir=/home/gcb/Desktop is to create associated icons on the desktop, which can be launched to take you back into a game, where you left off (saved game state). You don't want the screenshots to appear on the desktop, so the existing structure is fine....but ....we should check for current value of $savestate_dir/names.uss or such, to avoid any incorrect/invalid screenshot images being shown?...(maybe timestamp?)...

Test 2;

Already apparent above -- I load the game StuntCarRacerTNT, and practice tracks for level1 ; I then choose to F12 -> Savestates panel, to Save that to StuntCarRacerTNT_v1.3-12.uss ('slot 12')...

....I direct-load the .uss file later, which starts back in the game where I left off ... and a select another level to practice those tracks. When I choose to, I expect to be able to hit F12 -> Savestates panel -- and Save (read: overwrite/update) the existing .uss file .... and if you do this in the GUI, it completes such operations without error, giving the impression it completed this task...

....however, it didn't.... instead, it stripped off the filename, substituted 'default', but kept the slot number...and created..

/home/gcb/Desktop/default-12.uss

....and also created another screenshot of the same name, which is a waste as neither of which get shown in the Savestates panel ....normally speaking, (*)see below...because.. the name 'default-12' doesn't match the currently loaded Amiga file....uh-huh? ;) You'd think an easy workaround here, would be "Do you want to overwrite the existing file?" dialog... but you'd also need a "Do you want to overwrite the existing slot savefile?" ....as the user might want to do that...but...

Test 3;

...as you can't click on any slot in the Savestate panel, and get any visual indication of whether the slot is in use or not, ...and by what (title) ... it's pretty much impossible to make a knowledgeable choice ;)

(*)From the above example ... if you load the StuntCarRacerTNT file, in GUI -> Savestates, StuntCarRacerTNT_v1.3-12.uss is shown ....

....OTOH, if you launch amiberry StuntCarRacerTNT_v1.3-12.uss, the savestate entry 'default-12.uss' is shown....

...once that is so, the name 'default' matches with any other screenshots of the same name, and you can end up with...

ex2

Seems things are a little unhinged wrt Savestates panel, or that it could be better... ;)

TIA

@midwan midwan self-assigned this Dec 23, 2024
@midwan midwan added the bug label Dec 23, 2024
@midwan midwan linked a pull request Dec 23, 2024 that will close this issue
midwan added a commit that referenced this issue Dec 23, 2024
* bugfix: set last active config to the savestate name (#1545)

* Enhance filename determination in gui_update()

The code now includes additional conditions to determine the `filename` in the `gui_update()` function. Specifically, it checks if `whdload_prefs.whdload_filename` is not empty and uses it to set the `filename`. If that condition is not met, it then checks if `last_loaded_config` has a non-zero length and uses it to set the `filename`. The previous logic that set `filename` to either `last_loaded_config` or "default.uae" has been removed.

* Improve savestate handling and UI feedback in PanelSavestate

Only enable buttons is a savestate title is set.
Show the title when displaying a not found message.
If a savestate is not found, don't try to load the screenshot for it either.
Minor code optimization.
@giantclambake
Copy link
Author

Kudos for these fix-ups, works great 8)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants