[Scummvm-git-logs] scummvm master -> 02bd4e46a3f8e3b6adecafc888f7f6af3b917023
sev-
noreply at scummvm.org
Sun Dec 5 13:27:39 UTC 2021
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
02bd4e46a3 AD: Simplified punycoded names processing and fixed support for full paths
Commit: 02bd4e46a3f8e3b6adecafc888f7f6af3b917023
https://github.com/scummvm/scummvm/commit/02bd4e46a3f8e3b6adecafc888f7f6af3b917023
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2021-12-05T14:23:17+01:00
Commit Message:
AD: Simplified punycoded names processing and fixed support for full paths
Changed paths:
engines/advancedDetector.cpp
diff --git a/engines/advancedDetector.cpp b/engines/advancedDetector.cpp
index 12961b589e..5aae23f6c8 100644
--- a/engines/advancedDetector.cpp
+++ b/engines/advancedDetector.cpp
@@ -466,10 +466,11 @@ void AdvancedMetaEngineDetection::composeFileHashMap(FileMap &allFiles, const Co
return;
for (Common::FSList::const_iterator file = fslist.begin(); file != fslist.end(); ++file) {
- Common::String tstr = ((_flags & kADFlagMatchFullPaths) && !parentName.empty() ? parentName + "/" : "") + file->getName();
+ Common::String efname = Common::punycode_encodefilename(file->getName());
+ Common::String tstr = ((_flags & kADFlagMatchFullPaths) && !parentName.empty() ? parentName + "/" : "") + efname;
if (file->isDirectory()) {
- if (!_globsMap.contains(file->getName()))
+ if (!_globsMap.contains(efname))
continue;
Common::FSList files;
@@ -583,7 +584,7 @@ ADDetectedGames AdvancedMetaEngineDetection::detectGame(const Common::FSNode &pa
g = (const ADGameDescription *)descPtr;
for (fileDesc = g->filesDescriptions; fileDesc->fileName; fileDesc++) {
- Common::String fname = Common::punycode_decodefilename(fileDesc->fileName);
+ Common::String fname = fileDesc->fileName;
Common::String key = Common::String::format("%c:%s", flagsToMD5Prefix(g->flags), fname.c_str());
if (filesProps.contains(key))
@@ -625,7 +626,7 @@ ADDetectedGames AdvancedMetaEngineDetection::detectGame(const Common::FSNode &pa
// Try to match all files for this game
for (fileDesc = game.desc->filesDescriptions; fileDesc->fileName; fileDesc++) {
- Common::String tstr = Common::punycode_decodefilename(fileDesc->fileName);
+ Common::String tstr = fileDesc->fileName;
Common::String key = Common::String::format("%c:%s", flagsToMD5Prefix(g->flags), tstr.c_str());
if (!filesProps.contains(key) || filesProps[key].size == -1) {
@@ -694,7 +695,7 @@ ADDetectedGames AdvancedMetaEngineDetection::detectGame(const Common::FSNode &pa
gotAnyMatchesWithAllFiles = true;
} else {
- debugC(5, kDebugGlobalDetection, "Skipping game: %s (%s %s/%s) (%d)", g->gameId, g->extra,
+ debugC(7, kDebugGlobalDetection, "Skipping game: %s (%s %s/%s) (%d)", g->gameId, g->extra,
getPlatformDescription(g->platform), getLanguageDescription(g->language), i);
}
}
@@ -835,6 +836,7 @@ void AdvancedMetaEngineDetection::preprocessDescriptions() {
if (!tok.empty()) { // If it is not the last component
_globsMap.setVal(component, true);
+ debugC(4, kDebugGlobalDetection, " Added '%s' to globs", component.c_str());
}
}
}
More information about the Scummvm-git-logs
mailing list