]> de.git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
try to detect a .app package in MacOSX and use a basedir outside the .app
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Mon, 30 May 2005 21:58:45 +0000 (21:58 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Mon, 30 May 2005 21:58:45 +0000 (21:58 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@5361 d7cf8633-e32d-0410-b094-e92efae38249

fs.c

diff --git a/fs.c b/fs.c
index 904645d6811ae2de99ffd6e7621891cae18d6b73..6f7a4fc83a2829863396fd2cef3ff72203811924 100644 (file)
--- 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 ();