]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
on OSX use ~/Library/Application Support/<gamename> instead of ~/.gamename
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Fri, 29 Apr 2011 08:07:37 +0000 (08:07 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Fri, 29 Apr 2011 08:07:37 +0000 (08:07 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11082 d7cf8633-e32d-0410-b094-e92efae38249

fs.c

diff --git a/fs.c b/fs.c
index 8d505e8b3604ce2664d668054b553926a05150c6..b26dd4f25cc13938c31ea2268b701a7819c6d063 100644 (file)
--- a/fs.c
+++ b/fs.c
@@ -1771,7 +1771,13 @@ void FS_Init (void)
 #else
                homedir = getenv ("HOME");
                if(homedir)
+               {
+#ifdef __APPLE__
+                       dpsnprintf(fs_userdir, sizeof(fs_userdir), "%s/Library/Application Support/%s/", homedir, gameuserdirname);
+#else
                        dpsnprintf(fs_userdir, sizeof(fs_userdir), "%s/.%s/", homedir, gameuserdirname);
+#endif
+               }
 
                if(!*fs_userdir)
                        Con_DPrintf("Could not obtain home directory; assuming -nohome\n");