AD: Allow engines to prefer fallback detection

This commit is contained in:
sluicebox 2023-01-08 11:44:55 -08:00 committed by Eugene Sandulenko
parent 611efe9b90
commit 39b7925c84
2 changed files with 16 additions and 1 deletions

View file

@ -292,6 +292,11 @@ DetectedGames AdvancedMetaEngineDetection::detectGames(const Common::FSList &fsl
fallbackDetectedGame.preferredTarget += "-fallback";
}
if (_flags & kADFlagPreferFallbackDetection) {
// fallback detection was successful and this engine prefers
// it over the partial matches found in the detection table
detectedGames.clear();
}
detectedGames.push_back(fallbackDetectedGame);
}
}