mirror of
https://github.com/QB64-Phoenix-Edition/QB64pe.git
synced 2024-08-05 10:00:26 +00:00
Change FS_GetKnownDirectory() to return "/Applications" on macOS
This commit is contained in:
parent
77122d475a
commit
d8cb77e2d1
1 changed files with 8 additions and 0 deletions
|
@ -308,7 +308,11 @@ static std::string FS_GetKnownDirectory(FS_KnownDirectory kD) {
|
||||||
SHGetFolderPathA(NULL, CSIDL_PROGRAM_FILES | CSIDL_FLAG_CREATE, NULL, SHGFP_TYPE_CURRENT, &path[0]);
|
SHGetFolderPathA(NULL, CSIDL_PROGRAM_FILES | CSIDL_FLAG_CREATE, NULL, SHGFP_TYPE_CURRENT, &path[0]);
|
||||||
#else
|
#else
|
||||||
if (envVar) {
|
if (envVar) {
|
||||||
|
# ifdef QB64_MACOSX
|
||||||
|
path.assign("/Applications");
|
||||||
|
# else
|
||||||
path.assign("/opt");
|
path.assign("/opt");
|
||||||
|
# endif
|
||||||
if (!FS_DirectoryExists(path.c_str()))
|
if (!FS_DirectoryExists(path.c_str()))
|
||||||
path.clear();
|
path.clear();
|
||||||
}
|
}
|
||||||
|
@ -324,7 +328,11 @@ static std::string FS_GetKnownDirectory(FS_KnownDirectory kD) {
|
||||||
# endif
|
# endif
|
||||||
#else
|
#else
|
||||||
if (envVar) {
|
if (envVar) {
|
||||||
|
# ifdef QB64_MACOSX
|
||||||
|
path.assign("/Applications");
|
||||||
|
# else
|
||||||
path.assign("/opt");
|
path.assign("/opt");
|
||||||
|
# endif
|
||||||
if (!FS_DirectoryExists(path.c_str()))
|
if (!FS_DirectoryExists(path.c_str()))
|
||||||
path.clear();
|
path.clear();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue