From dd175f8bdf153d6d7f535820dd02ae3cbddb7fc2 Mon Sep 17 00:00:00 2001 From: havoc Date: Fri, 29 Apr 2011 08:07:37 +0000 Subject: [PATCH] on OSX use ~/Library/Application Support/ instead of ~/.gamename git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11082 d7cf8633-e32d-0410-b094-e92efae38249 ::stable-branch::merge=5873729e60f4dfad4523a04ac67a925e0039e71d --- fs.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/fs.c b/fs.c index 8d505e8b..b26dd4f2 100644 --- 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"); -- 2.39.2