[Scummvm-cvs-logs] SF.net SVN: scummvm:[39281] scummvm/trunk/engines/advancedDetector.cpp
sev at users.sourceforge.net
sev at users.sourceforge.net
Tue Mar 10 00:08:44 CET 2009
Revision: 39281
http://scummvm.svn.sourceforge.net/scummvm/?rev=39281&view=rev
Author: sev
Date: 2009-03-09 23:08:44 +0000 (Mon, 09 Mar 2009)
Log Message:
-----------
Fix for bug #2671611: T7G: Checksums for unknown english 7th Guest cd version
Now instead of showing partial list of files detector will provide "submit
md5" message only if at least one entry with every file present will be
found.
Modified Paths:
--------------
scummvm/trunk/engines/advancedDetector.cpp
Modified: scummvm/trunk/engines/advancedDetector.cpp
===================================================================
--- scummvm/trunk/engines/advancedDetector.cpp 2009-03-09 22:39:53 UTC (rev 39280)
+++ scummvm/trunk/engines/advancedDetector.cpp 2009-03-09 23:08:44 UTC (rev 39281)
@@ -371,6 +371,7 @@
ADGameDescList matched;
int maxFilesMatched = 0;
+ bool gotAnyMatchesWithAllFiles = false;
// MD5 based matching
uint i;
@@ -388,12 +389,15 @@
if ((params.flags & kADFlagUseExtraAsHint) && !extra.empty() && g->extra != extra)
continue;
+ bool allFilesPresent = true;
+
// Try to match all files for this game
for (fileDesc = g->filesDescriptions; fileDesc->fileName; fileDesc++) {
Common::String tstr = fileDesc->fileName;
if (!filesSizeMD5.contains(tstr)) {
fileMissing = true;
+ allFilesPresent = false;
break;
}
@@ -411,6 +415,19 @@
debug(3, "Matched file: %s", tstr.c_str());
}
+
+ // We found at least one entry with all required files present.
+ // That means that we got new variant of the game.
+ //
+ // Wihtout this check we would have errorneous checksum display
+ // where only located files will be enlisted.
+ //
+ // Potentially this could rule out variants where some particular file
+ // is really missing, but the developers should better know about such
+ // cases.
+ if (allFilesPresent)
+ gotAnyMatchesWithAllFiles = true;
+
if (!fileMissing) {
debug(2, "Found game: %s (%s %s/%s) (%d)", g->gameid, g->extra,
getPlatformDescription(g->platform), getLanguageDescription(g->language), i);
@@ -446,7 +463,7 @@
// We didn't find a match
if (matched.empty()) {
- if (!filesSizeMD5.empty()) {
+ if (!filesSizeMD5.empty() && gotAnyMatchesWithAllFiles) {
reportUnknown(parent, filesSizeMD5);
}
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