-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Description
On Android, calling SDL_GetBasePath() returns NULL instead of pointing to the expected ./assets/ directory.
const char* path = SDL_GetBasePath();
RC2D_log(RC2D_LOG_INFO, "Base path: %s\n", path); // path is NULL on Android
According to the documentation, SDL_GetBasePath() should return the directory where the application resides, which is usually ./assets/ on Android.
This behavior disrupts code that uses SDL_GetBasePath() as a fallback when using SDL_OpenTitleStorage(NULL, 0);.
This issue may be related to:
(see #13929).
Steps to reproduce this issue:
Build and run a simple SDL3 application on Android.
Call SDL_GetBasePath().
Note: The method returns NULL.
Expected result:
SDL_GetBasePath() should return a valid path (e.g., ./assets/) on Android.
Actual result:
Always returns NULL.
Note: I took some notes at the time on SDL2; SDL_GetBasePath() already returned NULL at the time, but since the Storage API is supposed to support most platforms to abstract this away, I find it restrictive.