DETECTION: Clear MD5 cache when starting games

This fixes the cache being preserved between different game starts
This commit is contained in:
SupSuper 2021-05-31 22:13:08 +01:00 committed by Eugene Sandulenko
parent 84d2f0db8f
commit edb6d99b53

View File

@ -335,6 +335,9 @@ Common::Error AdvancedMetaEngineDetection::createInstance(OSystem *syst, Engine
FileMap allFiles;
composeFileHashMap(allFiles, files, (_maxScanDepth == 0 ? 1 : _maxScanDepth));
// Clear md5 cache before each detection starts, just in case.
MD5Man.clear();
// Run the detector on this
ADDetectedGames matches = detectGame(files.begin()->getParent(), allFiles, language, platform, extra);