From: havoc Date: Mon, 30 May 2005 21:58:45 +0000 (+0000) Subject: try to detect a .app package in MacOSX and use a basedir outside the .app X-Git-Tag: xonotic-v0.1.0preview~4821 X-Git-Url: https://de.git.xonotic.org/?p=xonotic%2Fdarkplaces.git;a=commitdiff_plain;h=7af7247c0a52badc41bdaa71ed39425d53f4f63d try to detect a .app package in MacOSX and use a basedir outside the .app git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@5361 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/fs.c b/fs.c index 904645d6..6f7a4fc8 100644 --- a/fs.c +++ b/fs.c @@ -903,7 +903,13 @@ void FS_Init (void) fs_mempool = Mem_AllocPool("file management", 0, NULL); strcpy(fs_basedir, "."); - strcpy(fs_gamedir, "."); + strcpy(fs_gamedir, ""); + +#ifdef MACOSX + // FIXME: is there a better way to find the directory outside the .app? + if (strstr(com_argv[0], ".app/")) + strcpy(fs_basedir, "../../.."); +#endif PK3_OpenLibrary ();