diff --git a/src/filesystem/unix/SDL_sysfilesystem.c b/src/filesystem/unix/SDL_sysfilesystem.c index ac3fe32c3..e80c5bad4 100644 --- a/src/filesystem/unix/SDL_sysfilesystem.c +++ b/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);