summaryrefslogtreecommitdiff
path: root/Source
diff options
context:
space:
mode:
authorOatmealDome <julian@oatmealdome.me>2023-01-17 14:17:10 -0500
committerOatmealDome <julian@oatmealdome.me>2023-01-31 17:57:09 -0500
commitaf33d4f13f0de58144b3aace54800bf3fbdbc111 (patch)
tree3b88a348ab2c177800d52a05e60464a266f9c203 /Source
parent7f962a414684a69298839d23414e76c3200b5807 (diff)
CommonPaths: Split PORTABLE_USER_DIR into "portable" and "embedded" to accomodate macOS
Diffstat (limited to 'Source')
-rw-r--r--Source/Core/Common/CommonPaths.h9
-rw-r--r--Source/Core/UICommon/UICommon.cpp6
2 files changed, 7 insertions, 8 deletions
diff --git a/Source/Core/Common/CommonPaths.h b/Source/Core/Common/CommonPaths.h
index eeef21aa85..987a99d8cf 100644
--- a/Source/Core/Common/CommonPaths.h
+++ b/Source/Core/Common/CommonPaths.h
@@ -7,23 +7,22 @@
#define DIR_SEP "/"
#define DIR_SEP_CHR '/'
-// The user data dir
#define ROOT_DIR "."
#ifdef _WIN32
#define PORTABLE_USER_DIR "User"
#define NORMAL_USER_DIR "Dolphin Emulator"
#elif defined __APPLE__
-// On OS X, PORTABLE_USER_DIR exists within the .app, but *always* reference
-// the copy in Application Support instead! (Copied on first run)
-// You can use the File::GetUserPath() util for this
-#define PORTABLE_USER_DIR "Contents/Resources/User"
+#define PORTABLE_USER_DIR "User"
+#define EMBEDDED_USER_DIR "Contents/Resources/User"
#define NORMAL_USER_DIR "Library/Application Support/Dolphin"
#elif defined ANDROID
#define PORTABLE_USER_DIR "user"
+#define EMBEDDED_USER_DIR PORTABLE_USER_DIR
#define NORMAL_USER_DIR "/sdcard/dolphin-emu"
#define NOMEDIA_FILE ".nomedia"
#else
#define PORTABLE_USER_DIR "user"
+#define EMBEDDED_USER_DIR PORTABLE_USER_DIR
#define NORMAL_USER_DIR "dolphin-emu"
#endif
diff --git a/Source/Core/UICommon/UICommon.cpp b/Source/Core/UICommon/UICommon.cpp
index b2dd20dc41..3bf143b133 100644
--- a/Source/Core/UICommon/UICommon.cpp
+++ b/Source/Core/UICommon/UICommon.cpp
@@ -376,9 +376,9 @@ void SetUserDirectory(std::string custom_path)
CoTaskMemFree(appdata);
CoTaskMemFree(documents);
#else
- if (File::IsDirectory(ROOT_DIR DIR_SEP PORTABLE_USER_DIR))
+ if (File::IsDirectory(ROOT_DIR DIR_SEP EMBEDDED_USER_DIR))
{
- user_path = ROOT_DIR DIR_SEP PORTABLE_USER_DIR DIR_SEP;
+ user_path = ROOT_DIR DIR_SEP EMBEDDED_USER_DIR DIR_SEP;
}
else
{
@@ -412,7 +412,7 @@ void SetUserDirectory(std::string custom_path)
std::string exe_path = File::GetExeDirectory();
if (File::Exists(exe_path + DIR_SEP "portable.txt"))
{
- user_path = exe_path + DIR_SEP "User" DIR_SEP;
+ user_path = exe_path + DIR_SEP PORTABLE_USER_DIR DIR_SEP;
}
else if (env_path)
{