Sort games found in zip file by descending order of matching files so that game with the *most* matching files is picked

This commit is contained in:
Bart Trzynadlowski 2017-03-28 04:03:38 +00:00
parent aa4331c2c4
commit 318f4cf6dc

View file

@ -305,7 +305,7 @@ std::vector<std::string> GameLoader::IdentifyGamesInZipArchive(const ZipArchive
std::sort(sorted_games_found.begin(), sorted_games_found.end(),
[&files_per_game](const std::string &a, const std::string &b)
{
return files_per_game[a] < files_per_game[b];
return files_per_game[a] > files_per_game[b]; // sort descending order
});
return sorted_games_found;
}