From daa9fab32a49289f62418be356d4a9bda21faa50 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Fri, 29 Dec 2023 19:06:43 +0100 Subject: [PATCH] Don't try to replace textures if there's just an empty TEXTURES/{GAMEID} folder. --- GPU/Common/TextureReplacer.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/GPU/Common/TextureReplacer.cpp b/GPU/Common/TextureReplacer.cpp index 88ae5feee4..11421fb71e 100644 --- a/GPU/Common/TextureReplacer.cpp +++ b/GPU/Common/TextureReplacer.cpp @@ -180,6 +180,12 @@ bool TextureReplacer::LoadIni() { // Do what we can do anyway: Scan for textures and build the map. std::map> filenameMap; ScanForHashNamedFiles(dir, filenameMap); + + if (filenameMap.empty()) { + WARN_LOG(G3D, "No replacement textures found."); + return false; + } + ComputeAliasMap(filenameMap); } }