[Scummvm-cvs-logs] SF.net SVN: scummvm: [32497] scummvm/trunk/common
sev at users.sourceforge.net
sev at users.sourceforge.net
Mon Jun 2 20:19:59 CEST 2008
Revision: 32497
http://scummvm.svn.sourceforge.net/scummvm/?rev=32497&view=rev
Author: sev
Date: 2008-06-02 11:19:58 -0700 (Mon, 02 Jun 2008)
Log Message:
-----------
Implement ADGF_KEEPMATCH
Modified Paths:
--------------
scummvm/trunk/common/advancedDetector.cpp
scummvm/trunk/common/advancedDetector.h
Modified: scummvm/trunk/common/advancedDetector.cpp
===================================================================
--- scummvm/trunk/common/advancedDetector.cpp 2008-06-02 18:19:18 UTC (rev 32496)
+++ scummvm/trunk/common/advancedDetector.cpp 2008-06-02 18:19:58 UTC (rev 32497)
@@ -428,7 +428,13 @@
if (curFilesMatched > maxFilesMatched) {
debug(2, " ... new best match, removing all previous candidates");
maxFilesMatched = curFilesMatched;
- matched.clear();
+
+ for (uint j = 0; j < matched.size();) {
+ if (matched[j]->flags & ADGF_KEEPMATCH)
+ ++j;
+ else
+ matched.remove_at(j);
+ }
matched.push_back(g);
} else if (curFilesMatched == maxFilesMatched) {
matched.push_back(g);
Modified: scummvm/trunk/common/advancedDetector.h
===================================================================
--- scummvm/trunk/common/advancedDetector.h 2008-06-02 18:19:18 UTC (rev 32496)
+++ scummvm/trunk/common/advancedDetector.h 2008-06-02 18:19:58 UTC (rev 32497)
@@ -46,6 +46,8 @@
enum ADGameFlags {
ADGF_NO_FLAGS = 0,
+ ADGF_KEEPMATCH = (1 << 27), // this entry is kept even when there are matched
+ // entries with more files
ADGF_DROPLANGUAGE = (1 << 28), // don't add language to gameid
ADGF_CD = (1 << 29), // add "-cd" to gameid
ADGF_DEMO = (1 << 30) // add "-demo" to gameid
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