Fixed filesystem operations on Android

Full paths are used as-is, relative paths are prepended with SDL_GetAndroidInternalStoragePath(), and operations fall back to the asset system as appropriate.

This is consistent with the behavior of opening files on Android.
This commit is contained in:
Sam Lantinga
2025-09-21 17:26:29 -07:00
parent 005f10bd97
commit 26dd4e3abb
2 changed files with 96 additions and 11 deletions

View File

@@ -305,10 +305,7 @@ static void testBlitBlendMode(int mode)
/* Helper to check that a file exists */
static void AssertFileExist(const char *filename)
{
struct stat st;
int ret = stat(filename, &st);
SDLTest_AssertCheck(ret == 0, "Verify file '%s' exists", filename);
SDLTest_AssertCheck(SDL_GetPathInfo(filename, NULL), "Verify file '%s' exists", filename);
}
/* Test case functions */