X-Git-Url: https://git.jsancho.org/?a=blobdiff_plain;f=Source%2FMacCompatibility.cpp;h=d95664c8b348a6bf2239861cda44d9ab469c45bf;hb=76798663af96758c0894d583ca0e1aa7b58728c3;hp=e1226b608dc32edd854176e8d7b2bd56888b3257;hpb=0e06ef535cf522b55e2ba29178a4c188094fa038;p=lugaru.git diff --git a/Source/MacCompatibility.cpp b/Source/MacCompatibility.cpp index e1226b6..d95664c 100644 --- a/Source/MacCompatibility.cpp +++ b/Source/MacCompatibility.cpp @@ -16,6 +16,7 @@ #if PLATFORM_UNIX #include #include +#include #include typedef long long __int64; typedef __int64 LARGE_INTEGER; @@ -191,7 +192,11 @@ static inline const char *getPrefPath(void) if (homedir == NULL) homedir = "."; // oh well. +#if (defined(__APPLE__) && defined(__MACH__)) + const char *PREFPATHNAME = "Library/Application Support/Lugaru"; +#else const char *PREFPATHNAME = ".lugaru"; +#endif size_t len = strlen(homedir) + strlen(PREFPATHNAME) + 2; prefpath = new char[len]; snprintf(prefpath, len, "%s/%s", homedir, PREFPATHNAME);