mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-09 03:10:22 +00:00
AD: Properly set _maxScanDepth in case of automatic glob detection
This commit is contained in:
parent
a526eafb09
commit
950e3f459e
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user