From ebac2e49786bcdb24cf876afb64c7573a165ed61 Mon Sep 17 00:00:00 2001 From: GPUCode <47210458+GPUCode@users.noreply.github.com> Date: Thu, 3 Aug 2023 00:51:10 +0300 Subject: [PATCH] custom_tex_manager: Allow old hash in more cases (#6843) --- src/video_core/custom_textures/custom_tex_manager.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/video_core/custom_textures/custom_tex_manager.cpp b/src/video_core/custom_textures/custom_tex_manager.cpp index b8bb21438..18d69e129 100644 --- a/src/video_core/custom_textures/custom_tex_manager.cpp +++ b/src/video_core/custom_textures/custom_tex_manager.cpp @@ -170,9 +170,13 @@ bool CustomTexManager::ParseFilename(const FileUtil::FSTEntry& file, CustomTextu } void CustomTexManager::PrepareDumping(u64 title_id) { - // If a pack exists in the load folder that uses the old hash - // dump textures using the old hash. - ReadConfig(title_id, true); + // If a pack exists in the load folder that uses the old hash, dump textures using the old hash. + // This occurs either if a configuration file doesn't exist or that file sets the old hash. + const std::string load_path = + fmt::format("{}textures/{:016X}/", GetUserPath(FileUtil::UserPath::LoadDir), title_id); + if (FileUtil::Exists(load_path) && !ReadConfig(title_id, true)) { + use_new_hash = false; + } // Write template config file const std::string dump_path =