DETECTOR: Clear md5 cache before detection as well

This commit is contained in:
a/ 2021-05-02 23:47:13 +09:00 committed by Eugene Sandulenko
parent eba9fa8f30
commit 36a5797bae

View file

@ -32,6 +32,8 @@
#include "base/detection/detection.h" #include "base/detection/detection.h"
#include "engines/advancedDetector.h"
// Plugin versioning // Plugin versioning
int pluginTypeVersions[PLUGIN_TYPE_MAX] = { int pluginTypeVersions[PLUGIN_TYPE_MAX] = {
@ -722,6 +724,9 @@ DetectionResults EngineManager::detectGames(const Common::FSList &fslist) const
// run detection for all of them. // run detection for all of them.
plugins = getPlugins(PLUGIN_TYPE_ENGINE_DETECTION); plugins = getPlugins(PLUGIN_TYPE_ENGINE_DETECTION);
// Clear md5 cache before each detection starts, just in case.
MD5Man.clear();
// Iterate over all known games and for each check if it might be // Iterate over all known games and for each check if it might be
// the game in the presented directory. // the game in the presented directory.
for (iter = plugins.begin(); iter != plugins.end(); ++iter) { for (iter = plugins.begin(); iter != plugins.end(); ++iter) {