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
Add Game_Config + CmdlineParser + video options - Config 2 of N #2108
Conversation
09b046d
to
b68b592
Compare
234e6ba
to
88874ca
Compare
I need to do another round of testing, but this is ready for review now. |
We need a command line parser so it's easier to specify options and try to minimize the amount of work for exposing a config parameter between commandline / config file / scene settings. Whether we use a third party one or write our own doesn't much matter to me. Command line parsing is a simple exercise. Writing one seemed like less work than evaluating all these other options and then getting them to compile on all our platforms. This one has an unusual interface in that it parses and advances to the next in the same call. So it doesn't fit a traditional loop. This however is the most efficient way to do it and doesn't do any unnecessary extra parsing. Whatever we choose. It needs to support unicode and case (in)sensitivity the way we use them. It also needs to be able to support the legacy RPG_RT command line options seamlessly combined with more modern ones. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you rebase this? Not all PR builders work right now.
For cmdline_parser.h and config_parser.h the indent is still off: We don't indent public:/private:. They must move 1 to the left together with the rest.
loadFromConfig and loadFromArgs need a capital L.
The parser seems fairly solid and this entire PR is a good step in the correct direction. The flexibility is needed because we must support the legacy command line arguments. The configuration system also looks well designed (compared to that abomination in libretro ;)).
Because of its cmd+configfile handling I even consider this as a usable replacement for boost_programoptions.
cf8b76c
to
c5534dc
Compare
c5534dc
to
8e15292
Compare
Remove Player flags
8e15292
to
da15648
Compare
The PR provides the following
--config
-c