[Scummvm-git-logs] scummvm master -> 950e3f459e1867ed9462ea036efb3b9841371654

sev- noreply at scummvm.org
Sun Jul 31 14:58:48 UTC 2022


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:
950e3f459e AD: Properly set _maxScanDepth in case of automatic glob detection


Commit: 950e3f459e1867ed9462ea036efb3b9841371654
    https://github.com/scummvm/scummvm/commit/950e3f459e1867ed9462ea036efb3b9841371654
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2022-07-31T16:58:11+02:00

Commit Message:
AD: Properly set _maxScanDepth in case of automatic glob detection

Changed paths:
    engines/advancedDetector.cpp


diff --git a/engines/advancedDetector.cpp b/engines/advancedDetector.cpp
index 351606e6fdd..8817cf98e5c 100644
--- a/engines/advancedDetector.cpp
+++ b/engines/advancedDetector.cpp
@@ -847,6 +847,8 @@ void AdvancedMetaEngineDetection::preprocessDescriptions() {
 
 				Common::StringTokenizer tok(fileDesc->fileName, "/");
 
+				int depth = 0;
+
 				while (!tok.empty()) {
 					Common::String component = tok.nextToken();
 
@@ -854,6 +856,14 @@ void AdvancedMetaEngineDetection::preprocessDescriptions() {
 						_globsMap.setVal(component, true);
 						debugC(4, kDebugGlobalDetection, "  Added '%s' to globs", component.c_str());
 					}
+
+					depth++;
+				}
+
+				if (depth > _maxScanDepth) {
+					_maxScanDepth = depth;
+
+					debugC(4, kDebugGlobalDetection, "  Increased scan depth to %d", _maxScanDepth);
 				}
 			}
 		}




More information about the Scummvm-git-logs mailing list