From 9856a3da1bf5ffcd068fdd8e2b5b6a398ab04e35 Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Wed, 9 Feb 2022 18:45:03 +0100 Subject: [PATCH] ThemeData now only prints debug messages for missing files set using variables. --- es-core/src/ThemeData.cpp | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/es-core/src/ThemeData.cpp b/es-core/src/ThemeData.cpp index 0925aa0a5..dc5d96978 100644 --- a/es-core/src/ThemeData.cpp +++ b/es-core/src/ThemeData.cpp @@ -1136,10 +1136,22 @@ void ThemeData::parseElement(const pugi::xml_node& root, if (!ResourceManager::getInstance().fileExists(path)) { std::stringstream ss; - LOG(LogWarning) - << error.message << ": Couldn't find file \"" << node.text().get() << "\" " - << ((node.text().get() != path) ? "which resolves to \"" + path + "\"" : - ""); + // For explicits paths, print a warning if the file couldn't be found, but + // only print a debug message if it was set using a variable. + if (str == node.text().as_string()) { + LOG(LogWarning) + << error.message << ": Couldn't find file \"" << node.text().get() + << "\" " + << ((node.text().get() != path) ? "which resolves to \"" + path + "\"" : + ""); + } + else { + LOG(LogDebug) + << error.message << ": Couldn't find file \"" << node.text().get() + << "\" " + << ((node.text().get() != path) ? "which resolves to \"" + path + "\"" : + ""); + } } element.properties[nodeName] = path; break;