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

Only write config files to disk when parameters change #10524

Merged
merged 1 commit into from Apr 27, 2020

Conversation

jdgleaver
Copy link
Contributor

Description

At present, RetroArch continuously overwrites its configuration files:

  • retroarch.cfg is written every time content is closed, and when closing RetroArch itself

  • Core options are written every time content is closed

This represents a large amount of unnecessary disk access, which is quite slow (and also causes wear on solid state drives!)

With this PR, configuration files are only written to disk when the content actually changes.

All types of configuration file should now be 'well behaved' - with the exception of cheat files. These are still overwritten when closing content, since reusing old parameters may cause issues (and since I don't use cheats at all, I didn't feel confident enough to dabble with this)

While making these changes, I discovered and fixed a number of bugs:

  • RetroArch no longer crashes when attempting to save a config file after 'unsetting' a parameter (currently, this can be triggered quite easily by manipulating input remaps)

  • When using Material UI, RetroArch no longer modifies the wrong setting (or segfaults...) when tapping entries in the Quick Menu > Controls input remapping submenu

  • Quite a few real and potential memory leaks have been fixed.

@inactive123 inactive123 merged commit e9a35c1 into libretro:master Apr 27, 2020
@jdgleaver jdgleaver deleted the config-write-on-change branch April 28, 2020 09:11
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

Successfully merging this pull request may close these issues.

None yet

2 participants