diff options
author | Eugene Sandulenko | 2008-06-02 18:19:58 +0000 |
---|---|---|
committer | Eugene Sandulenko | 2008-06-02 18:19:58 +0000 |
commit | 70dd879e2f2c48e59a199d0555c5e11608641f6c (patch) | |
tree | 98a335b55d804f496014071d17a8e21067d97c4e /common/advancedDetector.cpp | |
parent | 12c3798ffb3184b57ef604225415dfac7511a4a2 (diff) | |
download | scummvm-rg350-70dd879e2f2c48e59a199d0555c5e11608641f6c.tar.gz scummvm-rg350-70dd879e2f2c48e59a199d0555c5e11608641f6c.tar.bz2 scummvm-rg350-70dd879e2f2c48e59a199d0555c5e11608641f6c.zip |
Implement ADGF_KEEPMATCH
svn-id: r32497
Diffstat (limited to 'common/advancedDetector.cpp')
-rw-r--r-- | common/advancedDetector.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/common/advancedDetector.cpp b/common/advancedDetector.cpp index 79289072df..8999a60942 100644 --- a/common/advancedDetector.cpp +++ b/common/advancedDetector.cpp @@ -428,7 +428,13 @@ static ADGameDescList detectGame(const FSList *fslist, const Common::ADParams &p 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); |