diff --git a/bin/OpenLara b/bin/OpenLara index e4dda8f..3bacdeb 100755 Binary files a/bin/OpenLara and b/bin/OpenLara differ diff --git a/src/platform/nix/main.cpp b/src/platform/nix/main.cpp index 10d1cb5..677fedf 100644 --- a/src/platform/nix/main.cpp +++ b/src/platform/nix/main.cpp @@ -1,5 +1,8 @@ #include #include +#include +#include +#include #include #include #include @@ -129,6 +132,16 @@ char Stream::contentDir[255]; int main() { Stream::contentDir[0] = Stream::cacheDir[0] = 0; + const char *home; + if (!(home = getenv("HOME"))) + home = getpwuid(getuid())->pw_dir; + strcat(Stream::cacheDir, home); + strcat(Stream::cacheDir, "/.OpenLara/"); + + struct stat st = {0}; + if (stat(Stream::cacheDir, &st) == -1 && mkdir(Stream::cacheDir, 0777) == -1) + Stream::cacheDir[0] = 0; + static int XGLAttr[] = { GLX_RGBA, GLX_DOUBLEBUFFER,