[WIP] Dynamic configuration framework #385
Draft
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The problem:
SolarSystemMaxDistance
used in render.cpp:So not only routines responsible for
celestia.cfg
reading aware of this option but GUI code as well. While the latter can be fixed with some common routines in celestiacore.cpp this will not make out config code more robust.Configuration files are read on application startup only, to reconfigure we should restart it.
Frontends save some different options using their specific methods so Gtk or win-native frontends are unable to read configuration saved by Qt frontend and vice verse.
So the requirements:
This PR is a very early attempt to provide such configuration framework, it provides only basic functions and even not integrated into Celestia codebase.
src/celengine/testprops.cc
provides an example of usage.Let's discuss its pros and cons.