mirror of https://github.com/mgba-emu/mgba.git
Qt: Parse --version flag
This commit is contained in:
parent
598dbff32f
commit
a36e4157c0
|
@ -61,10 +61,18 @@ int main(int argc, char* argv[]) {
|
|||
mSubParser subparser;
|
||||
initParserForGraphics(&subparser, &graphicsOpts);
|
||||
bool loaded = configController.parseArguments(&args, argc, argv, &subparser);
|
||||
if (loaded && args.showHelp) {
|
||||
if (loaded) {
|
||||
if (args.showHelp) {
|
||||
usage(argv[0], subparser.usage);
|
||||
freeArguments(&args);
|
||||
return 0;
|
||||
}
|
||||
if (args.showVersion) {
|
||||
version(argv[0]);
|
||||
freeArguments(&args);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
QApplication::setApplicationName(projectName);
|
||||
QApplication::setApplicationVersion(projectVersion);
|
||||
|
|
Loading…
Reference in New Issue