mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-03 21:41:26 +12:00
Support macOS bundling for binary distribution
This commit is contained in:
parent
c50d459b1e
commit
5a40c1802b
9 changed files with 109 additions and 39 deletions
|
@ -1376,10 +1376,16 @@ const std::string& fs::get_config_dir()
|
|||
|
||||
dir.resize(dir.rfind('/') + 1);
|
||||
#else
|
||||
|
||||
#ifdef __APPLE__
|
||||
if (const char* home = ::getenv("HOME"))
|
||||
dir = home + "/Library/Application Support"s;
|
||||
#else
|
||||
if (const char* home = ::getenv("XDG_CONFIG_HOME"))
|
||||
dir = home;
|
||||
else if (const char* home = ::getenv("HOME"))
|
||||
dir = home + "/.config"s;
|
||||
#endif
|
||||
else // Just in case
|
||||
dir = "./config";
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue