Skip to content

Persistent storage for global configuration #666

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

Closed
1 of 3 tasks
Ghabry opened this issue Dec 7, 2015 · 2 comments · Fixed by #2730
Closed
1 of 3 tasks

Persistent storage for global configuration #666

Ghabry opened this issue Dec 7, 2015 · 2 comments · Fixed by #2730
Assignees
Labels
Enhancement FileFinder Patch available Settings All about customizable features, storing and applying them UX For issues affecting the user experience, such annoyances, counter-intuitive or ugly design
Milestone

Comments

@Ghabry
Copy link
Member

Ghabry commented Dec 7, 2015

This one superseds #53

The game browser would make a bit more sense when you could browse (or auto scan as planned for Android) your hard disk and add game directories.
The game directories must be remembered.

This needs changes to the FileFinder:

  • CreateDirectory function
  • GetConfigDirectory function
  • GetConfigFile function

CreateDirectory: As the name says

GetConfigDirectory: Create path to config directory if non existant and return a DirectoryTree handle to it. SDL2 has a function for this (can't remember the name). The code could be used as a reference because I don't want a SDL2 dependency.

GetConfigFile: Return path to config file in config directory. Format to be decided, probably INI or JSON (picojson header)

Could probably also store other things in this file like button mappings (joystick), but that's not subject of this issue

[GameDirectories]
LastDirectory=
Folder1=
Folder2=
...
Folder9=
{
   "last_directory": "",
   "game_directories" : ["folder1", "folder2"]
}
@Ghabry Ghabry added FileFinder UX For issues affecting the user experience, such annoyances, counter-intuitive or ugly design Enhancement labels Dec 7, 2015
@carstene1ns
Copy link
Member

https://github.com/Malvineous/cfgpath could be used in parts too.

@Ghabry
Copy link
Member Author

Ghabry commented May 1, 2021

Once the VFS-stuff is in I will take a look at this.
Will be also useful for savegame redirection (save in APPDATA when the game dir is not writable). Also a requested feature for libretro

@fdelapena fdelapena added the Settings All about customizable features, storing and applying them label Jun 10, 2021
@Ghabry Ghabry self-assigned this Jul 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement FileFinder Patch available Settings All about customizable features, storing and applying them UX For issues affecting the user experience, such annoyances, counter-intuitive or ugly design
Development

Successfully merging a pull request may close this issue.

3 participants