Browse Source

SDL_sysfilesystem.c (SDL_GetBasePath): fixed the solaris code path.

Reference issue: https://github.com/libsdl-org/SDL/pull/6681
Ozkan Sezer 2 years ago
parent
commit
a3d7dd2464
1 changed files with 3 additions and 2 deletions
  1. 3 2
      src/filesystem/unix/SDL_sysfilesystem.c

+ 3 - 2
src/filesystem/unix/SDL_sysfilesystem.c

@@ -221,8 +221,9 @@ SDL_GetBasePath(void)
         }
 #endif
     }
-#if defined(__SOLARIS__)
-    else {
+
+#if defined(__SOLARIS__)  /* try this as a fallback if /proc didn't pan out */
+    if (!retval) {
         const char *path = getexecname();
         if ((path != NULL) && (path[0] == '/')) { /* must be absolute path... */
             retval = SDL_strdup(path);