mirror of
https://github.com/Ryujinx/SDL.git
synced 2025-03-22 23:45:06 +00:00
Add missing error reporting in Android_JNI_FileOpen()
Fixes https://github.com/libsdl-org/SDL/issues/8427 (cherry picked from commit a844d909426153985136433f28ee5621affce97e)
This commit is contained in:
parent
90255914a8
commit
259009a7ea
|
@ -1939,12 +1939,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;
|
||||
|
|
Loading…
Reference in a new issue