Преглед на файлове

~ combo value detection should now update combo list on shaders too instead of writting them directly

Signed-off-by: Alexis Maiquez <almamu@almamu.com>
Alexis Maiquez преди 5 години
родител
ревизия
8d0eb6d63c
променени са 1 файла, в които са добавени 3 реда и са изтрити 3 реда
  1. 3 3
      src/WallpaperEngine/Render/Shaders/Compiler.cpp

+ 3 - 3
src/WallpaperEngine/Render/Shaders/Compiler.cpp

@@ -501,15 +501,15 @@ namespace WallpaperEngine::Render::Shaders
             // if no combo is defined just load the default settings
             if ((*defvalue).is_number_float ())
             {
-                this->m_compiledContent += "#define " + (*combo).get <std::string> () + " " + std::to_string ((*defvalue).get <irr::f32> ()) + "\n";
+                throw std::runtime_error ("float combos not supported");
             }
             else if ((*defvalue).is_number_integer ())
             {
-                this->m_compiledContent += "#define " + (*combo).get <std::string> () + " " + std::to_string ((*defvalue).get <irr::s32> ()) + "\n";
+                this->m_combos.insert (std::make_pair <std::string, int> (*combo, (*defvalue).get <irr::s32> ()));
             }
             else if ((*defvalue).is_string ())
             {
-                this->m_compiledContent += "#define " + (*combo).get <std::string> () + " " + (*defvalue).get <std::string> () + "\n";
+                throw std::runtime_error ("string combos not supported");
             }
             else
             {