aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Horn2011-06-14 18:15:47 +0200
committerMax Horn2011-06-14 18:52:11 +0200
commit5016645345630e485be55d005ba4bb7cd1e4b589 (patch)
treecbb6c980617d7bf910b7bc021c8e34ed6a8352cd
parent01f806c2dbd06d42c8e56b0a46493cf5d5a68a11 (diff)
downloadscummvm-rg350-5016645345630e485be55d005ba4bb7cd1e4b589.tar.gz
scummvm-rg350-5016645345630e485be55d005ba4bb7cd1e4b589.tar.bz2
scummvm-rg350-5016645345630e485be55d005ba4bb7cd1e4b589.zip
DETECTOR: Remove kADFlagPrintWarningOnFileBasedFallback
-rw-r--r--engines/advancedDetector.cpp13
-rw-r--r--engines/advancedDetector.h8
-rw-r--r--engines/touche/detection.cpp17
3 files changed, 18 insertions, 20 deletions
diff --git a/engines/advancedDetector.cpp b/engines/advancedDetector.cpp
index 82efb0d840..db2f404f5f 100644
--- a/engines/advancedDetector.cpp
+++ b/engines/advancedDetector.cpp
@@ -511,19 +511,6 @@ const ADGameDescription *AdvancedMetaEngine::detectGameFilebased(const FileMap &
}
}
- if (matchedDesc) { // We got a match
- if (_flags & kADFlagPrintWarningOnFileBasedFallback) {
- Common::String report = Common::String::format(_("Your game version has been detected using "
- "filename matching as a variant of %s."), matchedDesc->gameid);
- report += "\n";
- report += _("If this is an original and unmodified version, please report any");
- report += "\n";
- report += _("information previously printed by ScummVM to the team.");
- report += "\n";
- g_system->logMessage(LogMessageType::kInfo, report.c_str());
- }
- }
-
return matchedDesc;
}
diff --git a/engines/advancedDetector.h b/engines/advancedDetector.h
index 300ce7bbb5..13fb4b3fb6 100644
--- a/engines/advancedDetector.h
+++ b/engines/advancedDetector.h
@@ -117,16 +117,14 @@ struct ADFileBasedFallback {
enum ADFlags {
/**
- * Warn user about new variant if his version was detected with fallback
- */
- kADFlagPrintWarningOnFileBasedFallback = (1 << 1),
- /**
* Store value of extra field in config file, and use it as a hint
* on subsequent runs. Could be used when there is no way to autodetect
* game (when more than one game sits in same directory), and user picks
* up a variant manually.
+ * In addition, this is useful if two variants of a game sharing the same
+ * gameid are contained in a single directory.
*/
- kADFlagUseExtraAsHint = (1 << 2)
+ kADFlagUseExtraAsHint = (1 << 0)
};
diff --git a/engines/touche/detection.cpp b/engines/touche/detection.cpp
index 723fecec3a..0684144473 100644
--- a/engines/touche/detection.cpp
+++ b/engines/touche/detection.cpp
@@ -24,6 +24,7 @@
#include "engines/advancedDetector.h"
#include "common/savefile.h"
#include "common/system.h"
+#include "common/translation.h"
#include "base/plugins.h"
@@ -131,13 +132,25 @@ public:
ToucheMetaEngine() : AdvancedMetaEngine(Touche::gameDescriptions, sizeof(ADGameDescription), toucheGames) {
_md5Bytes = 4096;
_singleid = "touche";
- _flags = kADFlagPrintWarningOnFileBasedFallback;
_maxScanDepth = 2;
_directoryGlobs = directoryGlobs;
}
virtual const ADGameDescription *fallbackDetect(const FileMap &allFiles, const Common::FSList &fslist) const {
- return detectGameFilebased(allFiles, Touche::fileBasedFallback);
+ const ADGameDescription *matchedDesc = detectGameFilebased(allFiles, Touche::fileBasedFallback);
+
+ if (matchedDesc) { // We got a match
+ Common::String report = Common::String::format(_("Your game version has been detected using "
+ "filename matching as a variant of %s."), matchedDesc->gameid);
+ report += "\n";
+ report += _("If this is an original and unmodified version, please report any");
+ report += "\n";
+ report += _("information previously printed by ScummVM to the team.");
+ report += "\n";
+ g_system->logMessage(LogMessageType::kInfo, report.c_str());
+ }
+
+ return matchedDesc;
}
virtual const char *getName() const {