]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - fs.c
My Key_Event is disabled (yet).
[xonotic/darkplaces.git] / fs.c
diff --git a/fs.c b/fs.c
index 6f7a4fc83a2829863396fd2cef3ff72203811924..0b72b4d125200fc3d0fdb8609dd35764f4f987f2 100644 (file)
--- a/fs.c
+++ b/fs.c
@@ -908,7 +908,15 @@ void FS_Init (void)
 #ifdef MACOSX
        // FIXME: is there a better way to find the directory outside the .app?
        if (strstr(com_argv[0], ".app/"))
-               strcpy(fs_basedir, "../../..");
+       {
+               char *split;
+               char temp[4096];
+               split = strstr(com_argv[0], ".app/");
+               while (split > com_argv[0] && *split != '/')
+                       split--;
+               strlcpy(fs_basedir, com_argv[0], sizeof(fs_basedir));
+               fs_basedir[split - com_argv[0]] = 0;
+       }
 #endif
 
        PK3_OpenLibrary ();