aboutsummaryrefslogtreecommitdiff
path: root/engines/simon/game.cpp
diff options
context:
space:
mode:
authorMax Horn2006-04-15 17:39:14 +0000
committerMax Horn2006-04-15 17:39:14 +0000
commitad45318328e23b76e346414c62ef4c22d8ebe059 (patch)
tree9956847a38797471f73fd26ec3203dbbae6efd78 /engines/simon/game.cpp
parentdc5f513bcf7b6177a4d8f7e10fb4ed4dd55d7588 (diff)
downloadscummvm-rg350-ad45318328e23b76e346414c62ef4c22d8ebe059.tar.gz
scummvm-rg350-ad45318328e23b76e346414c62ef4c22d8ebe059.tar.bz2
scummvm-rg350-ad45318328e23b76e346414c62ef4c22d8ebe059.zip
Removed GameDetector::_gameid in favor of using a config manager entry
svn-id: r21915
Diffstat (limited to 'engines/simon/game.cpp')
-rw-r--r--engines/simon/game.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/engines/simon/game.cpp b/engines/simon/game.cpp
index 9e83b4d9ca..29d1df7bfb 100644
--- a/engines/simon/game.cpp
+++ b/engines/simon/game.cpp
@@ -113,11 +113,12 @@ DetectedGameList Engine_SIMON_detectGames(const FSList &fslist) {
}
Engine *Engine_SIMON_create(GameDetector *detector, OSystem *syst) {
- const ObsoleteGameID *o = obsoleteGameIDsTable;
- while (o->from) {
- if (!scumm_stricmp(detector->_gameid.c_str(), o->from)) {
- detector->_gameid = o->to;
+ const char *gameid = ConfMan.get("gameid").c_str();
+ for (const ObsoleteGameID *o = obsoleteGameIDsTable; o->from; ++o) {
+ if (!scumm_stricmp(gameid, o->from)) {
+ // Match found, perform upgrade
+ gameid = o->to;
ConfMan.set("gameid", o->to);
if (o->platform != Common::kPlatformUnknown)
@@ -127,7 +128,6 @@ Engine *Engine_SIMON_create(GameDetector *detector, OSystem *syst) {
ConfMan.flushToDisk();
break;
}
- o++;
}
return new Simon::SimonEngine(syst);