From ac117e390549e1bdd4cb9c1bef555ad1aaae1f1d Mon Sep 17 00:00:00 2001 From: Almamu Date: Fri, 12 Jul 2024 19:21:06 +0200 Subject: [PATCH] fix: default assets directory wasn't properly detected --- src/WallpaperEngine/Application/CApplicationContext.cpp | 2 +- src/WallpaperEngine/Render/CTextureCache.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/WallpaperEngine/Application/CApplicationContext.cpp b/src/WallpaperEngine/Application/CApplicationContext.cpp index 0d03566..bd8dda0 100644 --- a/src/WallpaperEngine/Application/CApplicationContext.cpp +++ b/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"; } } diff --git a/src/WallpaperEngine/Render/CTextureCache.cpp b/src/WallpaperEngine/Render/CTextureCache.cpp index 1ab8244..31a809b 100644 --- a/src/WallpaperEngine/Render/CTextureCache.cpp +++ b/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);