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

Reference issue: https://github.com/libsdl-org/SDL/pull/6681
This commit is contained in:
Ozkan Sezer 2022-12-02 06:23:30 +03:00
parent ab916e8a61
commit a3d7dd2464

View file

@ -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);