]> git.jsancho.org Git - lugaru.git/commitdiff
Use Mac-friendly prefpath.
authorRyan C. Gordon <icculus@icculus.org>
Sun, 1 Nov 2009 21:41:30 +0000 (16:41 -0500)
committerRyan C. Gordon <icculus@icculus.org>
Sun, 1 Nov 2009 21:41:30 +0000 (16:41 -0500)
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);