[Scummvm-cvs-logs] SF.net SVN: scummvm: [27144] scummvm/trunk/common/advancedDetector.cpp
fingolfin at users.sourceforge.net
fingolfin at users.sourceforge.net
Wed Jun 6 20:35:38 CEST 2007
Revision: 27144
http://scummvm.svn.sourceforge.net/scummvm/?rev=27144&view=rev
Author: fingolfin
Date: 2007-06-06 11:35:37 -0700 (Wed, 06 Jun 2007)
Log Message:
-----------
Adv detector: Merged upgradeTargetIfNecessary() into detectGameForEngineCreation()
Modified Paths:
--------------
scummvm/trunk/common/advancedDetector.cpp
Modified: scummvm/trunk/common/advancedDetector.cpp
===================================================================
--- scummvm/trunk/common/advancedDetector.cpp 2007-06-06 18:09:52 UTC (rev 27143)
+++ scummvm/trunk/common/advancedDetector.cpp 2007-06-06 18:35:37 UTC (rev 27144)
@@ -72,27 +72,6 @@
return GameList(params.list);
}
-static void upgradeTargetIfNecessary(const Common::ADParams ¶ms) {
- if (params.obsoleteList == 0)
- return;
-
- const char *gameid = ConfMan.get("gameid").c_str();
-
- for (const Common::ADObsoleteGameID *o = params.obsoleteList; o->from; ++o) {
- if (!scumm_stricmp(gameid, o->from)) {
- gameid = o->to;
- ConfMan.set("gameid", o->to);
-
- if (o->platform != Common::kPlatformUnknown)
- ConfMan.set("platform", Common::getPlatformCode(o->platform));
-
- warning("Target upgraded from %s to %s", o->from, o->to);
- ConfMan.flushToDisk();
- break;
- }
- }
-}
-
GameDescriptor findGameID(
const char *gameid,
const Common::ADParams ¶ms
@@ -221,10 +200,24 @@
const Common::ADParams ¶ms
) {
- upgradeTargetIfNecessary(params);
-
Common::String gameid = ConfMan.get("gameid");
+ if (params.obsoleteList != 0) {
+ for (const Common::ADObsoleteGameID *o = params.obsoleteList; o->from; ++o) {
+ if (!scumm_stricmp(gameid.c_str(), o->from)) {
+ gameid = o->to;
+ ConfMan.set("gameid", o->to);
+
+ if (o->platform != Common::kPlatformUnknown)
+ ConfMan.set("platform", Common::getPlatformCode(o->platform));
+
+ warning("Target upgraded from %s to %s", o->from, o->to);
+ ConfMan.flushToDisk();
+ break;
+ }
+ }
+ }
+
FSList fslist;
FilesystemNode dir(ConfMan.get("path"));
if (!dir.listDir(fslist, FilesystemNode::kListFilesOnly)) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list