Skip to content

Commit

Permalink
VideoCommon: add a way to get have a graphics directory count for all…
Browse files Browse the repository at this point in the history
… games by using a special 'all.txt' instead of a 'gameid.txt' file
  • Loading branch information
iwubcode committed Jun 26, 2022
1 parent 7854afe commit b9995b0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Source/Core/VideoCommon/HiresTextures.cpp
Expand Up @@ -433,17 +433,17 @@ std::set<std::string> GetTextureDirectoriesWithGameId(const std::string& root_di
}
}

const auto match_gameid = [game_id](const std::string& filename) {
const auto match_gameid_or_all = [game_id](const std::string& filename) {
std::string basename;
SplitPath(filename, nullptr, &basename, nullptr);
return basename == game_id || basename == game_id.substr(0, 3);
return basename == game_id || basename == game_id.substr(0, 3) || basename == "all";
};

// Look for any other directories that might be specific to the given gameid
const auto files = Common::DoFileSearch({root_directory}, {".txt"}, true);
for (const auto& file : files)
{
if (match_gameid(file))
if (match_gameid_or_all(file))
{
// The following code is used to calculate the top directory
// of a found gameid.txt file
Expand Down

0 comments on commit b9995b0

Please sign in to comment.