iOS: if the file doesn't exist in the pref path, use the current directory

Fixes https://github.com/libsdl-org/SDL/issues/14743

(cherry picked from commit a0307589bd)
This commit is contained in:
Sam Lantinga
2026-01-02 08:18:05 -08:00
parent 8de01986b1
commit 3d651ee403
2 changed files with 8 additions and 0 deletions

View File

@@ -377,6 +377,10 @@ bool SDL_SYS_GetPathInfo(const char *path, SDL_PathInfo *info)
}
rc = stat(apath, &statbuf);
SDL_free(apath);
if (rc < 0) {
rc = stat(path, &statbuf);
}
}
#else
rc = stat(path, &statbuf);