Przeglądaj źródła

fix: default assets directory wasn't properly detected

Almamu 2 lat temu
rodzic
commit
ac117e3905

+ 1 - 1
src/WallpaperEngine/Application/CApplicationContext.cpp

@@ -267,7 +267,7 @@ void CApplicationContext::validateAssets () {
         this->settings.general.assets = Steam::FileSystem::appDirectory (APP_DIRECTORY, "assets");
     } catch (std::runtime_error&) {
         // set current path as assets' folder
-        std::filesystem::path directory = std::filesystem::canonical ("/proc/self/exe").parent_path () / "assets";
+        this->settings.general.assets = std::filesystem::canonical ("/proc/self/exe").parent_path () / "assets";
     }
 }
 

+ 1 - 1
src/WallpaperEngine/Render/CTextureCache.cpp

@@ -15,7 +15,7 @@ const ITexture* CTextureCache::resolve (const std::string& filename) {
         return found->second;
 
     // search for the texture in all the different containers just in case
-    for (const auto it : this->getContext ().getApp ().getBackgrounds ()) {
+    for (const auto& it : this->getContext ().getApp ().getBackgrounds ()) {
         try {
             const ITexture* texture = it.second->getContainer ()->readTexture (filename);