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

Improve config file handling: Default settings, changed settings, etc. #2094

Open
nattthebear opened this issue Jun 4, 2020 · 4 comments
Open
Labels
App: EmuHawk Relating to EmuHawk frontend Enhancement For feature requests or possible improvements
Milestone

Comments

@nattthebear
Copy link
Contributor

Config.ini breaks and everyone cries.

Default settings change and users with existing config.ini files don't pick them up.

What can we do? I don't know, it's a big problem because there are a lot of assumptions baked into our config system.

TODO.

@nattthebear nattthebear added Enhancement For feature requests or possible improvements App: EmuHawk Relating to EmuHawk frontend labels Jun 4, 2020
@YoshiRulz
Copy link
Member

YoshiRulz commented Jun 4, 2020

The possibility of a config importer has been available since 8bb9cee. I'm imagining a clever use of wrappers and inheritance to make the deserialiser do all the work instead of checking each version/property.


@TiKevin83 suggested in IRC that if a movie is loaded and its SyncSettings schema doesn't match the current version of the core, the user should be asked to pick the equivalents of the old values (or the core could provide SyncSettings importers, but that probably won't happen).

@nattthebear
Copy link
Contributor Author

SyncSettings schema

I don't think we're tracking this at all right now, so it's not something we could do retroactively.

@YoshiRulz
Copy link
Member

Does our JSON library not support something like that? I would have thought comparing the key names would be enough to determine if it had changed.

@nattthebear
Copy link
Contributor Author

As I explained in IRC, if a property is missing in the old settings but present in the current schema, we do not know for sure why it's missing; whether it be from a different schema, or just the value wasn't present.

Also, real talk: While generally improved config handling is neato, is this particular SyncSettings fixup valuable beyond fixing a handful of gameboy movies?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
App: EmuHawk Relating to EmuHawk frontend Enhancement For feature requests or possible improvements
Projects
None yet
Development

No branches or pull requests

2 participants