mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-09 12:22:51 +00:00
SCUMM: Update the game's "extra" setting, if necessary
This would have been done at detection, but if the game entry is really old it may still be empty. We sometimes need it to tell versions apart.
This commit is contained in:
parent
9c7cd2c7e2
commit
4d468fb005
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user