mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-08-04 00:13:08 +00:00
Add global windows user folder
This commit is contained in:
parent
517d7f04c6
commit
15304ef913
@ -17,6 +17,8 @@
|
|||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
// This is the maximum number of UTF-16 code units permissible in Windows file paths
|
// This is the maximum number of UTF-16 code units permissible in Windows file paths
|
||||||
#define MAX_PATH 260
|
#define MAX_PATH 260
|
||||||
|
#include <Shlobj.h>
|
||||||
|
#include <windows.h>
|
||||||
#else
|
#else
|
||||||
// This is the maximum number of UTF-8 code units permissible in all other OSes' file paths
|
// This is the maximum number of UTF-8 code units permissible in all other OSes' file paths
|
||||||
#define MAX_PATH 1024
|
#define MAX_PATH 1024
|
||||||
@ -106,6 +108,10 @@ static auto UserPaths = [] {
|
|||||||
} else {
|
} else {
|
||||||
user_dir = std::filesystem::path(getenv("HOME")) / ".local" / "share" / "shadPS4";
|
user_dir = std::filesystem::path(getenv("HOME")) / ".local" / "share" / "shadPS4";
|
||||||
}
|
}
|
||||||
|
#elif _WIN32
|
||||||
|
TCHAR appdata[MAX_PATH] = {0};
|
||||||
|
SHGetFolderPath(NULL, CSIDL_APPDATA, NULL, 0, appdata);
|
||||||
|
user_dir = std::filesystem::path(appdata) / "shadPS4";
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user