rwops: Fixed some SDL2 symbols that got missed.

main
Ryan C. Gordon 2024-03-14 21:57:21 -04:00
parent 5f64cc511e
commit 3a344cf877
No known key found for this signature in database
GPG Key ID: FA148B892AB48044
10 changed files with 18 additions and 18 deletions

View File

@ -1051,7 +1051,7 @@ typedef SDL_GameController, SDL_Gamepad;
@@
@@
- SDL_GameControllerAddMappingsFromRW
+ SDL_AddGamepadMappingsFromRW
+ SDL_AddGamepadMappingsFromIO
(...)
@@
typedef SDL_GameControllerAxis, SDL_GamepadAxis;

View File

@ -526,7 +526,7 @@ The following structures have been renamed:
The following functions have been renamed:
* SDL_GameControllerAddMapping() => SDL_AddGamepadMapping()
* SDL_GameControllerAddMappingsFromFile() => SDL_AddGamepadMappingsFromFile()
* SDL_GameControllerAddMappingsFromRW() => SDL_AddGamepadMappingsFromRW()
* SDL_GameControllerAddMappingsFromRW() => SDL_AddGamepadMappingsFromIO()
* SDL_GameControllerClose() => SDL_CloseGamepad()
* SDL_GameControllerFromInstanceID() => SDL_GetGamepadFromInstanceID()
* SDL_GameControllerFromPlayerIndex() => SDL_GetGamepadFromPlayerIndex()

View File

@ -279,7 +279,7 @@ extern DECLSPEC int SDLCALL SDL_AddGamepadMapping(const char *mapping);
* \sa SDL_AddGamepadMappingsFromFile
* \sa SDL_GetGamepadMappingForGUID
*/
extern DECLSPEC int SDLCALL SDL_AddGamepadMappingsFromRW(SDL_IOStream *src, SDL_bool freesrc);
extern DECLSPEC int SDLCALL SDL_AddGamepadMappingsFromIO(SDL_IOStream *src, SDL_bool freesrc);
/**
* Load a set of gamepad mappings from a file.
@ -301,7 +301,7 @@ extern DECLSPEC int SDLCALL SDL_AddGamepadMappingsFromRW(SDL_IOStream *src, SDL_
* \since This function is available since SDL 3.0.0.
*
* \sa SDL_AddGamepadMapping
* \sa SDL_AddGamepadMappingsFromRW
* \sa SDL_AddGamepadMappingsFromIO
* \sa SDL_GetGamepadMappingForGUID
*/
extern DECLSPEC int SDLCALL SDL_AddGamepadMappingsFromFile(const char *file);

View File

@ -205,7 +205,7 @@
#define SDL_GameController SDL_Gamepad
#define SDL_GameControllerAddMapping SDL_AddGamepadMapping
#define SDL_GameControllerAddMappingsFromFile SDL_AddGamepadMappingsFromFile
#define SDL_GameControllerAddMappingsFromRW SDL_AddGamepadMappingsFromRW
#define SDL_GameControllerAddMappingsFromRW SDL_AddGamepadMappingsFromIO
#define SDL_GameControllerAxis SDL_GamepadAxis
#define SDL_GameControllerBindType SDL_GamepadBindingType
#define SDL_GameControllerButton SDL_GamepadButton
@ -701,7 +701,7 @@
#define SDL_GameController SDL_GameController_renamed_SDL_Gamepad
#define SDL_GameControllerAddMapping SDL_GameControllerAddMapping_renamed_SDL_AddGamepadMapping
#define SDL_GameControllerAddMappingsFromFile SDL_GameControllerAddMappingsFromFile_renamed_SDL_AddGamepadMappingsFromFile
#define SDL_GameControllerAddMappingsFromRW SDL_GameControllerAddMappingsFromRW_renamed_SDL_AddGamepadMappingsFromRW
#define SDL_GameControllerAddMappingsFromRW SDL_GameControllerAddMappingsFromRW_renamed_SDL_AddGamepadMappingsFromIO
#define SDL_GameControllerAxis SDL_GameControllerAxis_renamed_SDL_GamepadAxis
#define SDL_GameControllerBindType SDL_GameControllerBindType_renamed_SDL_GamepadBindingType
#define SDL_GameControllerButton SDL_GameControllerButton_renamed_SDL_GamepadButton

View File

@ -548,7 +548,7 @@ extern DECLSPEC size_t SDLCALL SDL_IOvprintf(SDL_IOStream *context, SDL_PRINTF_F
*
* \since This function is available since SDL 3.0.0.
*/
extern DECLSPEC void *SDLCALL SDL_LoadFile_RW(SDL_IOStream *src, size_t *datasize, SDL_bool freesrc);
extern DECLSPEC void *SDLCALL SDL_LoadFile_IO(SDL_IOStream *src, size_t *datasize, SDL_bool freesrc);
/**
* Load all the data from a file path.

View File

@ -4,7 +4,7 @@ SDL3_0.0.0 {
SDL_DYNAPI_entry;
SDL_AddEventWatch;
SDL_AddGamepadMapping;
SDL_AddGamepadMappingsFromRW;
SDL_AddGamepadMappingsFromIO;
SDL_AddHintCallback;
SDL_AddTimer;
SDL_AndroidBackButton;
@ -409,7 +409,7 @@ SDL3_0.0.0 {
SDL_LoadBMP;
SDL_LoadBMP_IO;
SDL_LoadFile;
SDL_LoadFile_RW;
SDL_LoadFile_IO;
SDL_LoadFunction;
SDL_LoadObject;
SDL_LockJoysticks;

View File

@ -28,7 +28,7 @@
#define SDL_AddEventWatch SDL_AddEventWatch_REAL
#define SDL_AddGamepadMapping SDL_AddGamepadMapping_REAL
#define SDL_AddGamepadMappingsFromRW SDL_AddGamepadMappingsFromRW_REAL
#define SDL_AddGamepadMappingsFromIO SDL_AddGamepadMappingsFromIO_REAL
#define SDL_AddHintCallback SDL_AddHintCallback_REAL
#define SDL_AddTimer SDL_AddTimer_REAL
#define SDL_AndroidBackButton SDL_AndroidBackButton_REAL
@ -433,7 +433,7 @@
#define SDL_LoadBMP SDL_LoadBMP_REAL
#define SDL_LoadBMP_IO SDL_LoadBMP_IO_REAL
#define SDL_LoadFile SDL_LoadFile_REAL
#define SDL_LoadFile_RW SDL_LoadFile_RW_REAL
#define SDL_LoadFile_IO SDL_LoadFile_IO_REAL
#define SDL_LoadFunction SDL_LoadFunction_REAL
#define SDL_LoadObject SDL_LoadObject_REAL
#define SDL_LockJoysticks SDL_LockJoysticks_REAL

View File

@ -103,7 +103,7 @@ SDL_DYNAPI_PROC(SDL_bool,SDL_IsDeXMode,(void),(),return)
SDL_DYNAPI_PROC(int,SDL_AddEventWatch,(SDL_EventFilter a, void *b),(a,b),return)
SDL_DYNAPI_PROC(int,SDL_AddGamepadMapping,(const char *a),(a),return)
SDL_DYNAPI_PROC(int,SDL_AddGamepadMappingsFromRW,(SDL_IOStream *a, SDL_bool b),(a,b),return)
SDL_DYNAPI_PROC(int,SDL_AddGamepadMappingsFromIO,(SDL_IOStream *a, SDL_bool b),(a,b),return)
SDL_DYNAPI_PROC(int,SDL_AddHintCallback,(const char *a, SDL_HintCallback b, void *c),(a,b,c),return)
SDL_DYNAPI_PROC(SDL_TimerID,SDL_AddTimer,(Uint32 a, SDL_TimerCallback b, void *c),(a,b,c),return)
SDL_DYNAPI_PROC(int,SDL_AtomicAdd,(SDL_AtomicInt *a, int b),(a,b),return)
@ -487,7 +487,7 @@ SDL_DYNAPI_PROC(SDL_bool,SDL_IsJoystickHaptic,(SDL_Joystick *a),(a),return)
SDL_DYNAPI_PROC(SDL_Surface*,SDL_LoadBMP,(const char *a),(a),return)
SDL_DYNAPI_PROC(SDL_Surface*,SDL_LoadBMP_IO,(SDL_IOStream *a, SDL_bool b),(a,b),return)
SDL_DYNAPI_PROC(void*,SDL_LoadFile,(const char *a, size_t *b),(a,b),return)
SDL_DYNAPI_PROC(void*,SDL_LoadFile_RW,(SDL_IOStream *a, size_t *b, SDL_bool c),(a,b,c),return)
SDL_DYNAPI_PROC(void*,SDL_LoadFile_IO,(SDL_IOStream *a, size_t *b, SDL_bool c),(a,b,c),return)
SDL_DYNAPI_PROC(SDL_FunctionPointer,SDL_LoadFunction,(void *a, const char *b),(a,b),return)
SDL_DYNAPI_PROC(void*,SDL_LoadObject,(const char *a),(a),return)
SDL_DYNAPI_PROC(void,SDL_LockJoysticks,(void),(),)

View File

@ -763,7 +763,7 @@ int SDL_CloseIO(SDL_IOStream *iostr)
}
/* Load all the data from an SDL data stream */
void *SDL_LoadFile_RW(SDL_IOStream *src, size_t *datasize, SDL_bool freesrc)
void *SDL_LoadFile_IO(SDL_IOStream *src, size_t *datasize, SDL_bool freesrc)
{
const int FILE_CHUNK_SIZE = 1024;
Sint64 size, size_total = 0;
@ -832,7 +832,7 @@ done:
void *SDL_LoadFile(const char *file, size_t *datasize)
{
return SDL_LoadFile_RW(SDL_IOFromFile(file, "rb"), datasize, SDL_TRUE);
return SDL_LoadFile_IO(SDL_IOFromFile(file, "rb"), datasize, SDL_TRUE);
}
SDL_PropertiesID SDL_GetRWProperties(SDL_IOStream *context)

View File

@ -1789,7 +1789,7 @@ static GamepadMapping_t *SDL_PrivateGetGamepadMapping(SDL_JoystickID instance_id
/*
* Add or update an entry into the Mappings Database
*/
int SDL_AddGamepadMappingsFromRW(SDL_IOStream *src, SDL_bool freesrc)
int SDL_AddGamepadMappingsFromIO(SDL_IOStream *src, SDL_bool freesrc)
{
const char *platform = SDL_GetPlatform();
int gamepads = 0;
@ -1797,7 +1797,7 @@ int SDL_AddGamepadMappingsFromRW(SDL_IOStream *src, SDL_bool freesrc)
size_t db_size;
size_t platform_len;
buf = (char *)SDL_LoadFile_RW(src, &db_size, freesrc);
buf = (char *)SDL_LoadFile_IO(src, &db_size, freesrc);
if (!buf) {
return SDL_SetError("Could not allocate space to read DB into memory");
}
@ -1845,7 +1845,7 @@ int SDL_AddGamepadMappingsFromRW(SDL_IOStream *src, SDL_bool freesrc)
int SDL_AddGamepadMappingsFromFile(const char *file)
{
return SDL_AddGamepadMappingsFromRW(SDL_IOFromFile(file, "rb"), 1);
return SDL_AddGamepadMappingsFromIO(SDL_IOFromFile(file, "rb"), 1);
}
int SDL_ReloadGamepadMappings(void)