From e3e377ecddea7e249db929423ca878e991ca2384 Mon Sep 17 00:00:00 2001 From: Almamu Date: Wed, 20 Aug 2025 00:02:42 +0200 Subject: [PATCH] chore: fix combo names not being uppercase when they should be --- .../Render/Shaders/CShaderUnit.cpp | 25 +++++++++++++++---- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/src/WallpaperEngine/Render/Shaders/CShaderUnit.cpp b/src/WallpaperEngine/Render/Shaders/CShaderUnit.cpp index 8e88515..e9dba1a 100644 --- a/src/WallpaperEngine/Render/Shaders/CShaderUnit.cpp +++ b/src/WallpaperEngine/Render/Shaders/CShaderUnit.cpp @@ -541,7 +541,10 @@ const std::string& CShaderUnit::compile () { for (const auto& combo : this->m_overrideCombos) { if (addedCombos.find (combo.first) == addedCombos.end ()) { - this->m_final += DEFINE_COMBO (combo.first, combo.second); + std::string name; + std::transform (combo.first.begin (), combo.first.end (), std::back_inserter (name), ::toupper); + + this->m_final += DEFINE_COMBO (name, combo.second); } addedCombos.emplace (combo.first, true); @@ -549,14 +552,20 @@ const std::string& CShaderUnit::compile () { // now add all the combos to the source for (const auto& combo : this->m_combos) { if (addedCombos.find (combo.first) == addedCombos.end ()) { - this->m_final += DEFINE_COMBO (combo.first, combo.second); + std::string name; + std::transform (combo.first.begin (), combo.first.end (), std::back_inserter (name), ::toupper); + + this->m_final += DEFINE_COMBO (name, combo.second); } addedCombos.emplace (combo.first, true); } for (const auto& combo : this->m_discoveredCombos) { if (addedCombos.find (combo.first) == addedCombos.end ()) { - this->m_final += DEFINE_COMBO (combo.first, combo.second); + std::string name; + std::transform (combo.first.begin (), combo.first.end (), std::back_inserter (name), ::toupper); + + this->m_final += DEFINE_COMBO (name, combo.second); } addedCombos.emplace (combo.first, true); @@ -564,14 +573,20 @@ const std::string& CShaderUnit::compile () { if (this->m_link != nullptr) { for (const auto& combo : this->m_link->getCombos ()) { if (addedCombos.find (combo.first) == addedCombos.end ()) { - this->m_final += DEFINE_COMBO (combo.first, combo.second); + std::string name; + std::transform (combo.first.begin (), combo.first.end (), std::back_inserter (name), ::toupper); + + this->m_final += DEFINE_COMBO (name, combo.second); } addedCombos.emplace (combo.first, true); } for (const auto& combo : this->m_link->getDiscoveredCombos ()) { if (addedCombos.find (combo.first) == addedCombos.end ()) { - this->m_final += DEFINE_COMBO (combo.first, combo.second); + std::string name; + std::transform (combo.first.begin (), combo.first.end (), std::back_inserter (name), ::toupper); + + this->m_final += DEFINE_COMBO (name, combo.second); } addedCombos.emplace (combo.first, true);