[Scummvm-git-logs] scummvm master -> 8af3ca44e36488d51e9aa685b66fb7737e3c0149

sev- noreply at scummvm.org
Thu Jul 30 19:58:29 UTC 2026


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://api.github.com/repos/scummvm/scummvm .

Summary:
8af3ca44e3 Revert "AD: Skip detection for engines with no matching filenames"


Commit: 8af3ca44e36488d51e9aa685b66fb7737e3c0149
    https://github.com/scummvm/scummvm/commit/8af3ca44e36488d51e9aa685b66fb7737e3c0149
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2026-07-30T21:57:16+02:00

Commit Message:
Revert "AD: Skip detection for engines with no matching filenames"

This reverts commit 8f5741a37ae1a202d0600c4dc44f000ade832fcc.

This breaks MacOS file schemas, which were not taken into account when
implementing this optimization.

Fixes bug #17026

Changed paths:
    engines/advancedDetector.cpp
    engines/advancedDetector.h


diff --git a/engines/advancedDetector.cpp b/engines/advancedDetector.cpp
index 0032e24e67b..1288e44761f 100644
--- a/engines/advancedDetector.cpp
+++ b/engines/advancedDetector.cpp
@@ -732,20 +732,6 @@ ADDetectedGames AdvancedMetaEngineDetectionBase::detectGame(const Common::FSNode
 
 	preprocessDescriptions();
 
-	// Early rejection: if none of the file names referenced by this engine's
-	// detection entries exist in the game folder, there is no chance of a match.
-	bool anyFileFound = false;
-	for (auto it = allFiles.begin(); it != allFiles.end(); ++it) {
-		if (_fileNamesMap.contains(it->_key)) {
-			anyFileFound = true;
-			break;
-		}
-	}
-	if (!anyFileFound) {
-		debugC(3, kDebugGlobalDetection, "Skipping engine '%s': no matching file names in directory", getName());
-		return matched;
-	}
-
 	// Check which files are included in some ADGameDescription *and* whether
 	// they are present. Compute MD5s and file sizes for the available files.
 	for (descPtr = _gameDescriptors; ((const ADGameDescription *)descPtr)->gameId != nullptr; descPtr += _descItemSize) {
@@ -1032,27 +1018,6 @@ void AdvancedMetaEngineDetectionBase::preprocessDescriptions() {
 	for (const byte *descPtr = _gameDescriptors; ((const ADGameDescription *)descPtr)->gameId != nullptr; descPtr += _descItemSize) {
 		const ADGameDescription *g = (const ADGameDescription *)descPtr;
 
-		// Collect all unique file names for early rejection
-		for (const ADGameFileDescription *fileDesc = g->filesDescriptions; fileDesc->fileName; fileDesc++) {
-			Common::String fname = fileDesc->fileName;
-
-			// For archive entries, extract the archive name
-			if (gameFileToMD5Props(fileDesc, g->flags) & kMD5Archive) {
-				Common::StringTokenizer tok(fname, ":");
-				tok.nextToken(); // skip archive type
-				fname = tok.nextToken(); // archive name
-			}
-
-			// For paths with directory components, extract the leaf filename
-			// unless kADFlagMatchFullPaths is set
-			if (!(_flags & kADFlagMatchFullPaths) && fname.contains('/')) {
-				fname = Common::Path(fname).baseName();
-			}
-
-			_fileNamesMap.setVal(Common::Path(fname, fname.contains('/')
-				? '/' : Common::Path::kNoSeparator), true);
-		}
-
 		// Scan for potential directory globs
 		for (const ADGameFileDescription *fileDesc = g->filesDescriptions; fileDesc->fileName; fileDesc++) {
 			if (strchr(fileDesc->fileName, '/')) {
diff --git a/engines/advancedDetector.h b/engines/advancedDetector.h
index 289c64207f1..473b5e5ffe1 100644
--- a/engines/advancedDetector.h
+++ b/engines/advancedDetector.h
@@ -554,7 +554,6 @@ private:
 private:
 	Common::HashMap<Common::String, bool, Common::IgnoreCase_Hash, Common::IgnoreCase_EqualTo> _grayListMap;
 	Common::HashMap<Common::String, bool, Common::IgnoreCase_Hash, Common::IgnoreCase_EqualTo> _globsMap;
-	Common::HashMap<Common::Path, bool, Common::Path::IgnoreCase_Hash, Common::Path::IgnoreCase_EqualTo> _fileNamesMap;
 	bool _hashMapsInited;
 
 protected:




More information about the Scummvm-git-logs mailing list