]> git.jsancho.org Git - lugaru.git/blobdiff - Source/MacCompatibility.cpp
Use Mac-friendly prefpath.
[lugaru.git] / Source / MacCompatibility.cpp
index a6b4d70e8160f7cff9c6a25d04de08d82bbedb1c..d95664c8b348a6bf2239861cda44d9ab469c45bf 100644 (file)
@@ -192,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);