]> git.jsancho.org Git - lugaru.git/blobdiff - Source/MacCompatibility.cpp
Drop keyboard input if it was part of the grab or window/fullscreen toggle.
[lugaru.git] / Source / MacCompatibility.cpp
index e1226b608dc32edd854176e8d7b2bd56888b3257..d95664c8b348a6bf2239861cda44d9ab469c45bf 100644 (file)
@@ -16,6 +16,7 @@
 #if PLATFORM_UNIX
 #include <unistd.h>
 #include <sys/time.h>
+#include <sys/stat.h>
 #include <assert.h>
 typedef long long __int64;
 typedef __int64 LARGE_INTEGER;
@@ -191,7 +192,11 @@ static inline const char *getPrefPath(void)
         if (homedir == NULL)
             homedir = ".";  // oh well.
 
+#if (defined(__APPLE__) && defined(__MACH__))
+        const char *PREFPATHNAME = "Library/Application Support/Lugaru";
+#else
         const char *PREFPATHNAME = ".lugaru";
+#endif
         size_t len = strlen(homedir) + strlen(PREFPATHNAME) + 2;
         prefpath = new char[len];
         snprintf(prefpath, len, "%s/%s", homedir, PREFPATHNAME);