From b65704f59ac97bc6a51d30faf3204608b0e612bf Mon Sep 17 00:00:00 2001 From: LunaMoo Date: Sun, 26 Feb 2017 19:24:32 +0100 Subject: [PATCH] Texture Replacement allow clut hash only variant. --- Core/TextureReplacer.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/Core/TextureReplacer.cpp b/Core/TextureReplacer.cpp index c359ceab73..7b63f9d1ae 100644 --- a/Core/TextureReplacer.cpp +++ b/Core/TextureReplacer.cpp @@ -411,10 +411,18 @@ std::string TextureReplacer::LookupHashFile(u64 cachekey, u32 hash, int level) { auto alias = aliases_.find(key); if (alias == aliases_.end()) { // Also check for a few more aliases with zeroed portions: - // No data hash. + // Only clut hash (very dangerous in theory, in practice not more than missing "just" data hash) + key.cachekey = cachekey & 0xFFFFFFFFULL; key.hash = 0; alias = aliases_.find(key); + if (alias == aliases_.end()) { + // No data hash. + key.cachekey = cachekey; + key.hash = 0; + alias = aliases_.find(key); + } + if (alias == aliases_.end()) { // No address. key.cachekey = cachekey & 0xFFFFFFFFULL;