mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-25 07:35:38 +00:00
(Linux and Unix) Made it possible to change the application data directory using the ESDE_APPDATA_DIR environment variable
This commit is contained in:
parent
c514dc7748
commit
4260ecdbfc
|
@ -252,7 +252,15 @@ namespace Utils
|
||||||
return getHomePath();
|
return getHomePath();
|
||||||
#else
|
#else
|
||||||
if (FileSystemVariables::sAppDataDirectory.empty()) {
|
if (FileSystemVariables::sAppDataDirectory.empty()) {
|
||||||
|
#if !defined(_WIN64)
|
||||||
|
if (getenv("ESDE_APPDATA_DIR") != nullptr) {
|
||||||
|
const std::string envAppDataDir {getenv("ESDE_APPDATA_DIR")};
|
||||||
|
FileSystemVariables::sAppDataDirectory = expandHomePath(envAppDataDir);
|
||||||
|
}
|
||||||
|
else if (Utils::FileSystem::exists(getHomePath() + "/ES-DE")) {
|
||||||
|
#else
|
||||||
if (Utils::FileSystem::exists(getHomePath() + "/ES-DE")) {
|
if (Utils::FileSystem::exists(getHomePath() + "/ES-DE")) {
|
||||||
|
#endif
|
||||||
FileSystemVariables::sAppDataDirectory = getHomePath() + "/ES-DE";
|
FileSystemVariables::sAppDataDirectory = getHomePath() + "/ES-DE";
|
||||||
}
|
}
|
||||||
else if (Utils::FileSystem::exists(getHomePath() + "/.emulationstation")) {
|
else if (Utils::FileSystem::exists(getHomePath() + "/.emulationstation")) {
|
||||||
|
|
Loading…
Reference in a new issue