diff options
author | Max Horn | 2007-02-13 15:03:43 +0000 |
---|---|---|
committer | Max Horn | 2007-02-13 15:03:43 +0000 |
commit | 433e7d69ac155c03ded74de11b4f1db4dbfc2a2f (patch) | |
tree | eaa094e98fd04406958c1ec7ec150b5994f2036a | |
parent | 4968e912ce005f582a34cd0fba7395ebdfc7dc40 (diff) | |
download | scummvm-rg350-433e7d69ac155c03ded74de11b4f1db4dbfc2a2f.tar.gz scummvm-rg350-433e7d69ac155c03ded74de11b4f1db4dbfc2a2f.tar.bz2 scummvm-rg350-433e7d69ac155c03ded74de11b4f1db4dbfc2a2f.zip |
Thanks to the previous changes, we can now cleanup detectGameForEngineCreation somewhat
svn-id: r25548
-rw-r--r-- | common/advancedDetector.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/common/advancedDetector.cpp b/common/advancedDetector.cpp index 70529bc430..f243d1f044 100644 --- a/common/advancedDetector.cpp +++ b/common/advancedDetector.cpp @@ -231,14 +231,15 @@ PluginError detectGameForEngineCreation( return kInvalidPathError; } - GameList detectedGames = detectAllGames(fslist, params); + Common::ADList matches = detectGame(&fslist, params, Common::UNK_LANG, Common::kPlatformUnknown); // We have single ID set, so we have a game if there are hits - if (params.singleid != NULL && detectedGames.size()) + if (params.singleid != NULL && matches.size()) return kNoError; - for (uint i = 0; i < detectedGames.size(); i++) { - if (detectedGames[i].gameid() == gameid) { + for (uint i = 0; i < matches.size(); i++) { + const ADGameDescription *adgDesc = (const ADGameDescription *)(params.descs + matches[i] * params.descItemSize); + if (adgDesc->gameid == gameid) { return kNoError; } } |