diff --git a/engines/scumm/metaengine.cpp b/engines/scumm/metaengine.cpp index 653571f909f..998774f6161 100644 --- a/engines/scumm/metaengine.cpp +++ b/engines/scumm/metaengine.cpp @@ -336,6 +336,12 @@ Common::Error ScummMetaEngine::createInstance(OSystem *syst, Engine **engine) { // file transparently. Common::updateGameGUIOptions(res.game.guioptions, getGameGUIOptionsDescriptionLanguage(res.language)); + // If the game was added really long ago, it may be missing its "extra" + // field. When adding game-specific options, it may be our only way of + // telling certain versions apart, so make sure it's updated. + if (res.game.variant && res.game.variant[0] && !ConfMan.hasKey("extra")) + ConfMan.setAndFlush("extra", res.game.variant); + // Check for a user override of the platform. We allow the user to override // the platform, to make it possible to add games which are not yet in // our MD5 database but require a specific platform setting. @@ -527,10 +533,8 @@ GUI::OptionsContainerWidget *ScummMetaEngine::buildEngineOptionsWidgetDynamic(GU if (ConfMan.get("gameid", target) != "loom") return nullptr; - // These Loom settings are only relevant for the EGA version, so - // exclude non-DOS versions. If the game was added a long time ago, - // the platform may still be listed as unknown, and there may be no - // "extra" field to query. + // These Loom settings are only relevant for the EGA version, since + // that is the only one that has an overture. Common::Platform platform = Common::parsePlatform(ConfMan.get("platform", target)); if (platform != Common::kPlatformUnknown && platform != Common::kPlatformDOS) @@ -541,7 +545,6 @@ GUI::OptionsContainerWidget *ScummMetaEngine::buildEngineOptionsWidgetDynamic(GU if (extra == "Steam" || extra == "VGA") return nullptr; - // So we still can't be quite sure it's the EGA version. Oh well... return new Scumm::LoomEgaGameOptionsWidget(boss, name, target); }