SDL_rwops read/write functions return size_t again

The current status is stored in the SDL_rwops 'status' field to be able to determine whether a 0 return value is caused by end of file, an error, or a non-blocking source not being ready.

The functions to read sized datatypes now return SDL_bool so you can detect read errors.

Fixes https://github.com/libsdl-org/SDL/issues/6729
This commit is contained in:
Sam Lantinga 2023-08-06 13:51:03 -07:00
parent c03f5b4b69
commit b903ccf945
20 changed files with 1154 additions and 754 deletions

View file

@ -504,12 +504,12 @@ SDL3_0.0.0 {
SDL_RWtell;
SDL_RWwrite;
SDL_RaiseWindow;
SDL_ReadBE16;
SDL_ReadBE32;
SDL_ReadBE64;
SDL_ReadLE16;
SDL_ReadLE32;
SDL_ReadLE64;
SDL_ReadU16BE;
SDL_ReadU32BE;
SDL_ReadU64BE;
SDL_ReadU16LE;
SDL_ReadU32LE;
SDL_ReadU64LE;
SDL_ReadU8;
SDL_RegisterApp;
SDL_RegisterEvents;
@ -676,12 +676,12 @@ SDL3_0.0.0 {
SDL_WinRTGetDeviceFamily;
SDL_WinRTGetFSPathUNICODE;
SDL_WinRTGetFSPathUTF8;
SDL_WriteBE16;
SDL_WriteBE32;
SDL_WriteBE64;
SDL_WriteLE16;
SDL_WriteLE32;
SDL_WriteLE64;
SDL_WriteU16BE;
SDL_WriteU32BE;
SDL_WriteU64BE;
SDL_WriteU16LE;
SDL_WriteU32LE;
SDL_WriteU64LE;
SDL_WriteU8;
SDL_abs;
SDL_acos;
@ -888,6 +888,17 @@ SDL3_0.0.0 {
SDL_IsAudioDevicePaused;
SDL_GetAudioStreamBinding;
SDL_ShowWindowSystemMenu;
SDL_ReadS16LE;
SDL_ReadS16BE;
SDL_ReadS32LE;
SDL_ReadS32BE;
SDL_ReadS64LE;
SDL_ReadS64BE;
SDL_WriteS16LE;
SDL_WriteS16BE;
SDL_WriteS32LE;
SDL_WriteS32BE;
SDL_WriteS64LE;
# extra symbols go here (don't modify this line)
local: *;
};