fix: default assets directory wasn't properly detected

This commit is contained in:
Almamu 2024-07-12 19:21:06 +02:00
parent 4bc5205034
commit ac117e3905
2 changed files with 2 additions and 2 deletions

View File

@ -267,7 +267,7 @@ void CApplicationContext::validateAssets () {
this->settings.general.assets = Steam::FileSystem::appDirectory (APP_DIRECTORY, "assets"); this->settings.general.assets = Steam::FileSystem::appDirectory (APP_DIRECTORY, "assets");
} catch (std::runtime_error&) { } catch (std::runtime_error&) {
// set current path as assets' folder // 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";
} }
} }

View File

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