rwops: Fixed build on Android.

This commit is contained in:
Ryan C. Gordon 2024-03-14 19:35:02 -04:00
parent fc7afa9cbf
commit 5f64cc511e
No known key found for this signature in database
GPG Key ID: FA148B892AB48044
2 changed files with 4 additions and 4 deletions

View File

@ -1980,7 +1980,7 @@ int Android_JNI_FileOpen(void **puserdata, const char *fileName, const char *mod
return 0;
}
size_t Android_JNI_FileRead(void *userdata, void *buffer, size_t size)
size_t Android_JNI_FileRead(void *userdata, void *buffer, size_t size, SDL_IOStatus *status)
{
const int bytes = AAsset_read((AAsset *)userdata, buffer, size);
if (bytes < 0) {
@ -1990,7 +1990,7 @@ size_t Android_JNI_FileRead(void *userdata, void *buffer, size_t size)
return (size_t)bytes;
}
size_t Android_JNI_FileWrite(void *userdata, const void *buffer, size_t size)
size_t Android_JNI_FileWrite(void *userdata, const void *buffer, size_t size, SDL_IOStatus *status)
{
return SDL_SetError("Cannot write to Android package filesystem");
}

View File

@ -69,8 +69,8 @@ extern SDL_bool Android_IsChromebook(void);
int Android_JNI_FileOpen(void **puserdata, const char *fileName, const char *mode);
Sint64 Android_JNI_FileSize(void *userdata);
Sint64 Android_JNI_FileSeek(void *userdata, Sint64 offset, int whence);
size_t Android_JNI_FileRead(void *userdata, void *buffer, size_t size);
size_t Android_JNI_FileWrite(void *userdata, const void *buffer, size_t size);
size_t Android_JNI_FileRead(void *userdata, void *buffer, size_t size, SDL_IOStatus *status);
size_t Android_JNI_FileWrite(void *userdata, const void *buffer, size_t size, SDL_IOStatus *status);
int Android_JNI_FileClose(void *userdata);
/* Environment support */