mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-25 23:55:38 +00:00
Fixed an issue where the IgnoreGamelist setting was saved although it shouldn't.
Also made a change so that passing the --ignore-gamelist command line option now immediately disables the ParseGamelistOnly setting.
This commit is contained in:
parent
077fb00f96
commit
08d893b119
|
@ -337,6 +337,7 @@ bool parseArgs(int argc, char* argv[])
|
|||
}
|
||||
else if (strcmp(argv[i], "--gamelist-only") == 0) {
|
||||
Settings::getInstance()->setBool("ParseGamelistOnly", true);
|
||||
settingsNeedSaving = true;
|
||||
}
|
||||
else if (strcmp(argv[i], "--ignore-gamelist") == 0) {
|
||||
Settings::getInstance()->setBool("IgnoreGamelist", true);
|
||||
|
@ -409,6 +410,11 @@ bool parseArgs(int argc, char* argv[])
|
|||
}
|
||||
}
|
||||
|
||||
if (Settings::getInstance()->getBool("IgnoreGamelist")) {
|
||||
Settings::getInstance()->setBool("ParseGamelistOnly", false);
|
||||
settingsNeedSaving = true;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -29,7 +29,6 @@ namespace
|
|||
// These options can be set using command-line arguments:
|
||||
"WindowWidth", // Set via --resolution [width] [height]
|
||||
"WindowHeight", // set via --resolution [width] [height]
|
||||
"ParseGamelistOnly" // --gamelist-only
|
||||
"IgnoreGamelist", // --ignore-gamelist
|
||||
"SplashScreen", // --no-splash
|
||||
"Debug", // --debug
|
||||
|
@ -359,7 +358,7 @@ void Settings::loadFile()
|
|||
pugi::xml_parse_result result = doc.load_file(configFile.c_str());
|
||||
#endif
|
||||
if (!result) {
|
||||
LOG(LogError) << "Could not parse the es_settings.xml file\n " << result.description();
|
||||
LOG(LogError) << "Couldn't parse the es_settings.xml file: " << result.description();
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue