Add missing error reporting in Android_JNI_FileOpen()

Fixes https://github.com/libsdl-org/SDL/issues/8427
This commit is contained in:
Sam Lantinga 2023-10-23 08:27:24 -07:00
parent 4ac38d13dd
commit a844d90942
1 changed files with 2 additions and 2 deletions

View File

@ -1975,12 +1975,12 @@ int Android_JNI_FileOpen(SDL_RWops *ctx,
}
if (asset_manager == NULL) {
return -1;
return SDL_SetError("Couldn't create asset manager");
}
asset = AAssetManager_open(asset_manager, fileName, AASSET_MODE_UNKNOWN);
if (asset == NULL) {
return -1;
return SDL_SetError("Couldn't open asset '%s'", fileName);
}
ctx->hidden.androidio.asset = (void *)asset;