From 6ecfc01b282c40cf54fa2570d27e425ca3467790 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torbj=C3=B6rn=20Andersson?= Date: Wed, 28 Jul 2021 09:18:02 +0200 Subject: [PATCH] SCUMM: Clean up getExtraGuiOptions() --- engines/scumm/detection.cpp | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/engines/scumm/detection.cpp b/engines/scumm/detection.cpp index a2ceabaafe8..cc54aa769f9 100644 --- a/engines/scumm/detection.cpp +++ b/engines/scumm/detection.cpp @@ -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;