diff --git a/Source/utils/paths.cpp b/Source/utils/paths.cpp index 5041f3751..c2f9b2341 100644 --- a/Source/utils/paths.cpp +++ b/Source/utils/paths.cpp @@ -20,7 +20,6 @@ namespace paths { namespace { -std::optional appPath; std::optional basePath; std::optional prefPath; std::optional configPath; @@ -51,18 +50,10 @@ std::string FromSDL(char *s) } // namespace -const std::string &AppPath() -{ - if (!appPath) { - appPath = FromSDL(SDL_GetBasePath()); - } - return *appPath; -} - const std::string &BasePath() { if (!basePath) { - basePath = AppPath(); + basePath = FromSDL(SDL_GetBasePath()); } return *basePath; } @@ -100,7 +91,7 @@ const std::string &ConfigPath() const std::string &AssetsPath() { if (!assetsPath) - assetsPath.emplace(AppPath() + "assets/"); + assetsPath.emplace(BasePath() + "assets/"); return *assetsPath; } diff --git a/Source/utils/paths.h b/Source/utils/paths.h index d20da7370..1a933ac0e 100644 --- a/Source/utils/paths.h +++ b/Source/utils/paths.h @@ -8,7 +8,6 @@ namespace devilution { namespace paths { -const std::string &AppPath(); const std::string &BasePath(); const std::string &PrefPath(); const std::string &ConfigPath();