mirror of
https://github.com/RetroDECK/org.DolphinEmu.dolphin-emu.git
synced 2024-11-22 13:45:39 +00:00
42 lines
1.5 KiB
Diff
42 lines
1.5 KiB
Diff
|
diff --git a/Source/Core/UICommon/UICommon.cpp b/Source/Core/UICommon/UICommon.cpp
|
||
|
index 2055c4d863..fdba657953 100644
|
||
|
--- a/Source/Core/UICommon/UICommon.cpp
|
||
|
+++ b/Source/Core/UICommon/UICommon.cpp
|
||
|
@@ -273,28 +273,11 @@ void SetUserDirectory(const std::string& custom_path)
|
||
|
user_path = home_path + DOLPHIN_DATA_DIR DIR_SEP;
|
||
|
}
|
||
|
#else
|
||
|
- // We are on a non-Apple and non-Android POSIX system, there are 4 cases:
|
||
|
- // 1. GetExeDirectory()/portable.txt exists
|
||
|
- // -> Use GetExeDirectory()/User
|
||
|
- // 2. $DOLPHIN_EMU_USERPATH is set
|
||
|
- // -> Use $DOLPHIN_EMU_USERPATH
|
||
|
- // 3. ~/.dolphin-emu directory exists
|
||
|
- // -> Use ~/.dolphin-emu
|
||
|
// 4. Default
|
||
|
// -> Use XDG basedir, see
|
||
|
// http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html
|
||
|
user_path = home_path + "." DOLPHIN_DATA_DIR DIR_SEP;
|
||
|
std::string exe_path = File::GetExeDirectory();
|
||
|
- if (File::Exists(exe_path + DIR_SEP "portable.txt"))
|
||
|
- {
|
||
|
- user_path = exe_path + DIR_SEP "User" DIR_SEP;
|
||
|
- }
|
||
|
- else if (env_path)
|
||
|
- {
|
||
|
- user_path = env_path;
|
||
|
- }
|
||
|
- else if (!File::Exists(user_path))
|
||
|
- {
|
||
|
const char* data_home = getenv("XDG_DATA_HOME");
|
||
|
std::string data_path =
|
||
|
std::string(data_home && data_home[0] == '/' ? data_home :
|
||
|
@@ -316,7 +299,6 @@ void SetUserDirectory(const std::string& custom_path)
|
||
|
File::SetUserPath(D_CONFIG_IDX, config_path);
|
||
|
File::SetUserPath(D_CACHE_IDX, cache_path);
|
||
|
return;
|
||
|
- }
|
||
|
#endif
|
||
|
}
|
||
|
#endif
|