SCUMM: Clean up getExtraGuiOptions()

This commit is contained in:
Torbjörn Andersson 2021-07-28 09:18:02 +02:00 committed by Eugene Sandulenko
parent 69c91a76ad
commit 6ecfc01b28

View file

@ -204,18 +204,24 @@ const ExtraGuiOptions ScummMetaEngineDetection::getExtraGuiOptions(const Common:
ExtraGuiOptions options;
// Query the GUI options
const Common::String guiOptionsString = ConfMan.get("guioptions", target);
const Common::String gameid = ConfMan.get("gameid", target);
const Common::String extra = ConfMan.get("extra", target);
const Common::String guiOptions = parseGameGUIOptions(guiOptionsString);
const Common::Platform platform = Common::parsePlatform(ConfMan.get("platform", target));
if (target.empty() || ConfMan.get("gameid", target) == "comi") {
if (target.empty() || gameid == "comi") {
options.push_back(comiObjectLabelsOption);
}
if (target.empty() || Common::parsePlatform(ConfMan.get("platform", target)) == Common::kPlatformNES) {
if (target.empty() || platform == Common::kPlatformNES) {
options.push_back(mmnesObjectLabelsOption);
}
if (target.empty() || (ConfMan.get("platform", target) == "fmtowns" && guiOptions.contains(GUIO_TRIM_FMTOWNS_TO_200_PIXELS))) {
if (target.empty() || (platform == Common::kPlatformFMTowns && guiOptions.contains(GUIO_TRIM_FMTOWNS_TO_200_PIXELS))) {
options.push_back(fmtownsTrimTo200);
}
if (target.empty() || (ConfMan.get("gameid", target) == "loom" && ConfMan.get("platform", target) == "macintosh" && ConfMan.get("extra", target) != "Steam")) {
// The Steam Mac version of Loom is more akin to the VGA DOS version,
// and that's how ScummVM usually sees it. But that rebranding does not
// happen until later.
if (target.empty() || (gameid == "loom" && platform == Common::kPlatformMacintosh && extra != "Steam")) {
options.push_back(macV3LowQualityMusic);
}
return options;