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

Save state path changed in v1.18.0 #16430

Closed
cmitu opened this issue Apr 10, 2024 · 5 comments
Closed

Save state path changed in v1.18.0 #16430

cmitu opened this issue Apr 10, 2024 · 5 comments

Comments

@cmitu
Copy link
Contributor

cmitu commented Apr 10, 2024

Description

Save states location has been changed after commit 338c9a4 (between 1.17.0 and 1.18.0).
This affects configurations where saves state location has been configured as content dir, via savestates_in_content_dir = "true".

After the commit, the save state path is under a sub-folder named after the core name, instead of being the content dir itself. E.g with the 'NP2Kai' (PC98) core:

  • behavior before the commit - the .state file path is the same folder as the content
  • behavior after the commit - the .state file path is <content dir>/Neko Project II kai

Obviously, upgrading with such a config breaks the existing save states, which is how I noticed the error, after my previous save states weren't found.

Steps to reproduce the bug

  1. Configure savestates_in_content_dir = "true" in retroarch.cfg
  2. Start a game/core
  3. Save the state and check where the .state file is saved - is not in the content dir.

Bisect Results

Bisected to 338c9a4

Version/Commit

Error found in v1.18.0

Environment information

  • OS: RaspiOS 12 bookworm, aarch64 (64bit ARM)
  • Compiler: GCC ver. 12.2
@sonninnos
Copy link
Collaborator

sonninnos commented Apr 10, 2024

It is supposed to simply combine the path with the sorting option as expected, so isn't the correct approach to just disable the sorting to get the previous behavior with the "write to content dir" only?

Not causing minor reconfiguration needs is pretty much impossible with this addition. Since previously the content dir option ignored the sorting options, which are enabled by default, but the content dir is not.

@cmitu
Copy link
Contributor Author

cmitu commented Apr 10, 2024

I don't know what 'sorting' is supposed to do - I've just read what's supposed to do in #16369 but and I see that the change may be intentional. FWIW I don't have any sorting options explicitely set.

I see it's specified in the PR:

If "put X in content directory" is set, replace that with the content base dir
If "sort X into folders by core name" is set, append core-name directory
If "sort X into folders by content directory" is set, append content directory

So based on what it says there, I'd expect that the 1st option (which is set in my config) to be used. It was used with 1.17.0, but suddenly in 1.18.0 with the same configuration I can't load my previous saves. Is this supposed to happen ?

FWIW the example given in the PR is a bit forced, I think most users organize their ROMs/games by system/platform (e.g. roms/snes, roms/amiga, etc.), but that's beside the point.

@sonninnos
Copy link
Collaborator

Sure if the "sort by core name" option is not enabled and it still adds that path, then there is a bug, otherwise it is as intended and desired. I haven't tested this addition yet.

@cmitu
Copy link
Contributor Author

cmitu commented Apr 10, 2024

The issue is the defaults for the sort saves/states is true (here).

After the change, the 'sorting' happens automatically, whereas before the change it was not (i.e. the content dir was treated specially and there was no subsequent sorting happening). The result is a missing state (or save) file.

EDIT: can confirm that after setting the sorting vars to false (sort_savestates_enable/ sort_savefiles_enable) I can load the previous state file.

@cmitu
Copy link
Contributor Author

cmitu commented Apr 11, 2024

OK, I'll close this issue since it's clearly working as designed. It just the design changed with the above mentioned commit - the impact is for configuration with savestates_in_content_dir and savefiles_in_content_dir options toggled on (which is not the default).

@sonninnos thank you for the reply.

@cmitu cmitu closed this as completed Apr 11, 2024
cmitu added a commit to cmitu/RetroPie-Setup that referenced this issue Apr 11, 2024
Upgraded RetroArch to version 1.18.0. Notable changes, cherry-picked from:

 - https://www.libretro.com/index.php/retroarch-1-17-0-release/
 - libretro/RetroArch@9e492f7

 * Netplay
   - expanded the protocol to allow multiplayer games running on separate consoles/computers.
     Cores like 'Dosbox-Pure' or 'gPSP' support the new protocol.
   - add support for joining MITM servers from command line
 * Cheevos
    - upgrade to v11.0
    - don’t track disc changes when achievements are disabled
    - inform user when server is unreachable
    - fix crash on first load of game with achievements with threaded video
  * Input
    - fix ghost input when setting RETROK_UNKNOWN
    - default ‘Bind Hold’ to 0 to prevent problems with controllers not resting at null state
    - don’t save mouse buttons to autoconfig
    - add a setting to allow turbo d-pad directions
    - change event detection to polling in udev_joypad
    - add option for merging ‘Hotkey Enable’ device types
    - fix input state combos including R3 and false triggers of RETROK_UNKNOWN (1.18.0)
    - add a new turbo mode, "Classic (Toggle)" (1.18.0)
    - limit axis threshold setting to sensible values (1.18.0)
  * Menu
    - fix menu analog stick navigation (1.16.0.1)
    - fix word wrapped widget length
    - fix quit on content close option
    - don’t process menu events while input is being flushed (1.16.0.2)
    - add help text to controller drivers
    - fix text scaling in 16:9 (RGUI)
    - thumbnail related fixes (missing thumbnail bar, fullscreen thumbnail flashing, sidebar focus, OZONE)
    - background images take precedence over color themes, default image opacity set the same as color theme opacity (XMB)
    - fix segmentation fault when background image is missing (XMB)
    - layout/thumbnail fixes – Thumbnail layout adjustments, Header title improvements, Handheld layout adjustments (XMB)
    - add sublabels for input bind common entries (1.18.0)
    - don't disable fast forward when entering menu (1.18.0)
    - add option to disable initial disk change (1.18.0)
    - visibility option for disk control notifications (1.18.0)
  * Video
    - use video refresh rate instead of core refresh rate for menu frame limiting
    - limit paused video refresh rate
    - enforce swap interval 1 in menu if vsync is on
    - add FinalViewportSize support to GLSL
    - change rotation type to int to maximize compatibility

  * Patching
    - add support for XDelta-formatted patches.
    - fix patching for cores that support contentless mode

  * Other
    - Frame Rest, experimental sleep feature aiming to lower CPU usage and temperature when using certain CPU hungry vsync modes
    - introduce wp_fractional_scale_v1 protocol for proper fractional scaling (Wayland)
    - update wayland-protocols version to 1.31 (Wayland)

RetroPie module changes:

 - make `iniConfig` use the same parameters every time
 - removed spurious `ret` files on `_install`
 - set `input_overlay_enable` to enabled, since the default changed (to 'false') in 1.17.0.
   It helps overlay users that didn't explicitely set this parameter in the overlay overrides they're using.
 - set `sort_savestates_enable` and `sort_savefiles_enable` to `false`, since in 1.18.0 RetroArch would otherwise create sub-folders under the content path folder for save states and save files (`.srm`) (see RA issue libretro/RetroArch#16430).
joolswills pushed a commit to joolswills/RetroPie-Setup that referenced this issue Apr 22, 2024
Upgraded RetroArch to version 1.18.0. Notable changes, cherry-picked from:

 - https://www.libretro.com/index.php/retroarch-1-17-0-release/
 - libretro/RetroArch@9e492f7

 * Netplay
   - expanded the protocol to allow multiplayer games running on separate consoles/computers.
     Cores like 'Dosbox-Pure' or 'gPSP' support the new protocol.
   - add support for joining MITM servers from command line
 * Cheevos
    - upgrade to v11.0
    - don’t track disc changes when achievements are disabled
    - inform user when server is unreachable
    - fix crash on first load of game with achievements with threaded video
  * Input
    - fix ghost input when setting RETROK_UNKNOWN
    - default ‘Bind Hold’ to 0 to prevent problems with controllers not resting at null state
    - don’t save mouse buttons to autoconfig
    - add a setting to allow turbo d-pad directions
    - change event detection to polling in udev_joypad
    - add option for merging ‘Hotkey Enable’ device types
    - fix input state combos including R3 and false triggers of RETROK_UNKNOWN (1.18.0)
    - add a new turbo mode, "Classic (Toggle)" (1.18.0)
    - limit axis threshold setting to sensible values (1.18.0)
  * Menu
    - fix menu analog stick navigation (1.16.0.1)
    - fix word wrapped widget length
    - fix quit on content close option
    - don’t process menu events while input is being flushed (1.16.0.2)
    - add help text to controller drivers
    - fix text scaling in 16:9 (RGUI)
    - thumbnail related fixes (missing thumbnail bar, fullscreen thumbnail flashing, sidebar focus, OZONE)
    - background images take precedence over color themes, default image opacity set the same as color theme opacity (XMB)
    - fix segmentation fault when background image is missing (XMB)
    - layout/thumbnail fixes – Thumbnail layout adjustments, Header title improvements, Handheld layout adjustments (XMB)
    - add sublabels for input bind common entries (1.18.0)
    - don't disable fast forward when entering menu (1.18.0)
    - add option to disable initial disk change (1.18.0)
    - visibility option for disk control notifications (1.18.0)
  * Video
    - use video refresh rate instead of core refresh rate for menu frame limiting
    - limit paused video refresh rate
    - enforce swap interval 1 in menu if vsync is on
    - add FinalViewportSize support to GLSL
    - change rotation type to int to maximize compatibility

  * Patching
    - add support for XDelta-formatted patches.
    - fix patching for cores that support contentless mode

  * Other
    - Frame Rest, experimental sleep feature aiming to lower CPU usage and temperature when using certain CPU hungry vsync modes
    - introduce wp_fractional_scale_v1 protocol for proper fractional scaling (Wayland)
    - update wayland-protocols version to 1.31 (Wayland)

RetroPie module changes:

 - make `iniConfig` use the same parameters every time
 - removed spurious `ret` files on `_install`
 - set `input_overlay_enable` to enabled, since the default changed (to 'false') in 1.17.0.
   It helps overlay users that didn't explicitely set this parameter in the overlay overrides they're using.
 - set `sort_savestates_enable` and `sort_savefiles_enable` to `false`, since in 1.18.0 RetroArch would otherwise create sub-folders under the content path folder for save states and save files (`.srm`) (see RA issue libretro/RetroArch#16430).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants