diff options
Diffstat (limited to 'common/advancedDetector.cpp')
-rw-r--r-- | common/advancedDetector.cpp | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/common/advancedDetector.cpp b/common/advancedDetector.cpp index 84b8365584..24e884a164 100644 --- a/common/advancedDetector.cpp +++ b/common/advancedDetector.cpp @@ -1,5 +1,8 @@ -/* ScummVM - Scumm Interpreter - * Copyright (C) 2004-2006 The ScummVM project +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -69,7 +72,7 @@ GameList gameIDList(const Common::ADParams ¶ms) { return GameList(params.list); } -void upgradeTargetIfNecessary(const Common::ADParams ¶ms) { +static void upgradeTargetIfNecessary(const Common::ADParams ¶ms) { if (params.obsoleteList == 0) return; @@ -97,25 +100,21 @@ GameDescriptor findGameID( const PlainGameDescriptor *g = params.list; while (g->gameid) { if (0 == scumm_stricmp(gameid, g->gameid)) - return *g; + return GameDescriptor(*g); g++; } - GameDescriptor gs; - if (params.obsoleteList != 0) { const Common::ADObsoleteGameID *o = params.obsoleteList; while (o->from) { if (0 == scumm_stricmp(gameid, o->from)) { - gs["gameid"] = gameid; - gs["description"] = "Obsolete game ID"; - return gs; + return GameDescriptor(gameid, "Obsolete game ID"); } o++; } - } else - return GameDescriptor(g->gameid, g->description); - return gs; + } + + return GameDescriptor(); } static GameDescriptor toGameDescriptor(const ADGameDescription &g, const PlainGameDescriptor *sg) { @@ -221,6 +220,9 @@ const ADGameDescription *detectBestMatchingGame( PluginError detectGameForEngineCreation( const Common::ADParams ¶ms ) { + + upgradeTargetIfNecessary(params); + Common::String gameid = ConfMan.get("gameid"); FSList fslist; |