From b9995b04a0369fbebe9c10bea8404a5e2206262c Mon Sep 17 00:00:00 2001 From: iwubcode Date: Tue, 15 Mar 2022 23:43:36 -0500 Subject: VideoCommon: add a way to get have a graphics directory count for all games by using a special 'all.txt' instead of a 'gameid.txt' file --- Source/Core/VideoCommon/HiresTextures.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'Source/Core/VideoCommon/HiresTextures.cpp') diff --git a/Source/Core/VideoCommon/HiresTextures.cpp b/Source/Core/VideoCommon/HiresTextures.cpp index 85c9cfc238..96b340772f 100644 --- a/Source/Core/VideoCommon/HiresTextures.cpp +++ b/Source/Core/VideoCommon/HiresTextures.cpp @@ -433,17 +433,17 @@ std::set 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 -- cgit v1.2.3 From 892678648eee7a1724b790fba0aa312e0fe8c728 Mon Sep 17 00:00:00 2001 From: iwubcode Date: Sat, 5 Mar 2022 14:52:43 -0600 Subject: VideoCommon: trigger mod calls in TextureCacheBase (efb/xfb calls), VertexManagerBase (draw calls), and VertexShaderManager (projection calls) --- Source/Core/VideoCommon/HiresTextures.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Source/Core/VideoCommon/HiresTextures.cpp') diff --git a/Source/Core/VideoCommon/HiresTextures.cpp b/Source/Core/VideoCommon/HiresTextures.cpp index 96b340772f..9636bfe651 100644 --- a/Source/Core/VideoCommon/HiresTextures.cpp +++ b/Source/Core/VideoCommon/HiresTextures.cpp @@ -213,7 +213,7 @@ void HiresTexture::Prefetch() 10000); } -std::string HiresTexture::GenBaseName(TextureInfo& texture_info, bool dump) +std::string HiresTexture::GenBaseName(const TextureInfo& texture_info, bool dump) { if (!dump && s_textureMap.empty()) return ""; @@ -261,7 +261,7 @@ u32 HiresTexture::CalculateMipCount(u32 width, u32 height) return mip_count; } -std::shared_ptr HiresTexture::Search(TextureInfo& texture_info) +std::shared_ptr HiresTexture::Search(const TextureInfo& texture_info) { const std::string base_filename = GenBaseName(texture_info); -- cgit v1.2.3