From 223f95f28ce31f8a24137bcd732a0e2d5729ed6f Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Sat, 30 Apr 2016 20:55:30 -0700 Subject: [PATCH] Allow a short alias for video frames, etc. --- Core/TextureReplacer.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Core/TextureReplacer.cpp b/Core/TextureReplacer.cpp index 51e08cb22d..3e3520794f 100644 --- a/Core/TextureReplacer.cpp +++ b/Core/TextureReplacer.cpp @@ -384,6 +384,14 @@ std::string TextureReplacer::LookupHashFile(u64 cachekey, u32 hash, int level) { return alias->second; } + // Also check for a cachekey-only alias. This is mainly for ignoring videos. + const std::string keyonly = hashname.substr(0, 16); + auto keyonlyAlias = aliases_.find(keyonly); + if (keyonlyAlias != aliases_.end()) { + // Note: this will be blank if explicitly ignored. + return keyonlyAlias->second; + } + return hashname + ".png"; }