aboutsummaryrefslogtreecommitdiff
path: root/common/advancedDetector.cpp
diff options
context:
space:
mode:
authorEugene Sandulenko2007-11-03 21:06:58 +0000
committerEugene Sandulenko2007-11-03 21:06:58 +0000
commitc640d1c604f219a5be5412d6c5ea8a85f44ec4b4 (patch)
tree5d6efb4954efb93e4d6e2f71a37486a666ee20ce /common/advancedDetector.cpp
parentc06905149286c3fbd803d3ca7522bbe66a6ad129 (diff)
downloadscummvm-rg350-c640d1c604f219a5be5412d6c5ea8a85f44ec4b4.tar.gz
scummvm-rg350-c640d1c604f219a5be5412d6c5ea8a85f44ec4b4.tar.bz2
scummvm-rg350-c640d1c604f219a5be5412d6c5ea8a85f44ec4b4.zip
Patch #1825276: "DETECTION: advanced detector engine simplification"
svn-id: r29386
Diffstat (limited to 'common/advancedDetector.cpp')
-rw-r--r--common/advancedDetector.cpp39
1 files changed, 1 insertions, 38 deletions
diff --git a/common/advancedDetector.cpp b/common/advancedDetector.cpp
index b15477c5a2..3b235835f3 100644
--- a/common/advancedDetector.cpp
+++ b/common/advancedDetector.cpp
@@ -70,7 +70,7 @@ GameList gameIDList(const Common::ADParams &params) {
return GameList(params.list);
}
-static void upgradeTargetIfNecessary(const Common::ADParams &params) {
+void upgradeTargetIfNecessary(const Common::ADParams &params) {
if (params.obsoleteList == 0)
return;
@@ -264,43 +264,6 @@ EncapsulatedADGameDesc detectBestMatchingGame(
return result;
}
-PluginError detectGameForEngineCreation(
- const Common::ADParams &params
- ) {
-
- upgradeTargetIfNecessary(params);
-
- Common::String gameid = ConfMan.get("gameid");
-
- FSList fslist;
- FilesystemNode dir(ConfMan.get("path"));
- if (!dir.getChildren(fslist, FilesystemNode::kListFilesOnly)) {
- return kInvalidPathError;
- }
-
- ADGameDescList 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 && matches.size())
- return kNoError;
-
- for (uint i = 0; i < matches.size(); i++) {
- if (matches[i]->gameid == gameid) {
- return kNoError;
- }
- }
-
- // Use fallback detector if there were no matches by other means
- if (params.fallbackDetectFunc != NULL) {
- EncapsulatedADGameDesc fallbackDesc = (*params.fallbackDetectFunc)(&fslist);
- if (fallbackDesc.realDesc != 0 && (params.singleid != NULL || fallbackDesc.getGameID() == gameid)) {
- return kNoError;
- }
- }
-
- return kNoGameDataFoundError;
-}
-
void reportUnknown(StringMap &filesMD5, HashMap<String, int32, Common::CaseSensitiveString_Hash, Common::CaseSensitiveString_EqualTo> &filesSize) {
// TODO: This message should be cleaned up / made more specific.
// For example, we should specify at least which engine triggered this.