sdl2-compat: Update change return void/int

From 0cd8b5862a3587915f4a174244b2434786d0b541 Mon Sep 17 00:00:00 2001
From: Sylvain <[EMAIL REDACTED]>
Date: Wed, 8 Feb 2023 10:02:18 +0100
Subject: [PATCH] Update change return void/int

---
 src/sdl2_compat.c | 204 +++++++++++++++++++++++++++++++++++++++++++++-
 src/sdl3_syms.h   |  68 ++++++++--------
 2 files changed, 237 insertions(+), 35 deletions(-)

diff --git a/src/sdl2_compat.c b/src/sdl2_compat.c
index e45cb56..e15199f 100644
--- a/src/sdl2_compat.c
+++ b/src/sdl2_compat.c
@@ -3210,7 +3210,7 @@ SDL_MixAudio(Uint8 *dst, const Uint8 *src, Uint32 len, int volume)
 {
     /* Mix the user-level audio format */
     if (g_audio_id > 0) {
-        SDL_MixAudioFormat(dst, src, g_audio_spec.format, len, volume); /* FIXME: is this correct ?? */
+        SDL3_MixAudioFormat(dst, src, g_audio_spec.format, len, volume); /* FIXME: is this correct ?? */
     }
 }
 
@@ -4150,7 +4150,209 @@ SDL_SetWindowMaximumSize(SDL_Window *window, int max_w, int max_h)
     SDL3_SetWindowMaximumSize(window, max_w, max_h);
 }
 
+DECLSPEC void SDLCALL
+SDL_MixAudioFormat(Uint8 *dst, const Uint8 *src, SDL_AudioFormat format, Uint32 len, int volume)
+{
+    SDL3_MixAudioFormat(dst, src, format, len, volume);
+}
+
+DECLSPEC void SDLCALL
+SDL_hid_close(SDL_hid_device * dev)
+{
+    SDL3_hid_close(dev);
+}
+
+DECLSPEC void SDLCALL
+SDL_JoystickSetPlayerIndex(SDL_Joystick *joystick, int player_index)
+{
+    SDL3_SetJoystickPlayerIndex(joystick, player_index);
+}
+
+DECLSPEC void SDLCALL
+SDL_JoystickClose(SDL_Joystick *joystick)
+{
+    SDL3_CloseJoystick(joystick);
+}
+
+DECLSPEC void SDLCALL
+SDL_SetTextInputRect(const SDL_Rect *rect)
+{
+    SDL3_SetTextInputRect(rect);
+}
+
+DECLSPEC void SDLCALL
+SDL_SetCursor(SDL_Cursor * cursor)
+{
+    SDL3_SetCursor(cursor);
+}
+
+DECLSPEC void SDLCALL
+SDL_FreeFormat(SDL_PixelFormat *format)
+{
+    SDL3_DestroyPixelFormat(format);
+}
+
+DECLSPEC void SDLCALL
+SDL_FreePalette(SDL_Palette *palette)
+{
+    SDL3_DestroyPalette(palette);
+}
+
+DECLSPEC void SDLCALL
+SDL_UnionRect(const SDL_Rect *A, const SDL_Rect *B, SDL_Rect *result)
+{
+    SDL3_GetRectUnion(A, B, result);
+}
+
+DECLSPEC void SDLCALL
+SDL_UnionFRect(const SDL_FRect *A, const SDL_FRect *B, SDL_FRect *result)
+{
+    SDL3_GetRectUnionFloat(A, B, result);
+}
+
+DECLSPEC void SDLCALL
+SDL_UnlockTexture(SDL_Texture *texture)
+{
+    SDL3_UnlockTexture(texture);
+}
+
+DECLSPEC void SDLCALL
+SDL_RenderPresent(SDL_Renderer *renderer)
+{
+    SDL3_RenderPresent(renderer);
+}
+
+DECLSPEC void SDLCALL
+SDL_DestroyTexture(SDL_Texture *texture)
+{
+    SDL3_DestroyTexture(texture);
+}
+
+DECLSPEC void SDLCALL
+SDL_DestroyRenderer(SDL_Renderer *renderer)
+{
+    SDL3_DestroyRenderer(renderer);
+}
+
+DECLSPEC void SDLCALL
+SDL_SetWindowPosition(SDL_Window *window, int x, int y)
+{
+    SDL3_SetWindowPosition(window, x, y);
+}
+
+DECLSPEC void SDLCALL
+SDL_GetWindowPosition(SDL_Window *window, int *x, int *y)
+{
+    SDL3_GetWindowPosition(window, x, y);
+}
+
+DECLSPEC void SDLCALL
+SDL_GetWindowSize(SDL_Window *window, int *w, int *h)
+{
+    SDL3_GetWindowSize(window, w, h);
+}
 
+DECLSPEC void SDLCALL
+SDL_GetWindowSizeInPixels(SDL_Window *window, int *w, int *h)
+{
+    SDL3_GetWindowSizeInPixels(window, w, h);
+}
+
+DECLSPEC void SDLCALL
+SDL_GetWindowMinimumSize(SDL_Window *window, int *w, int *h)
+{
+    SDL3_GetWindowMinimumSize(window, w, h);
+}
+
+DECLSPEC void SDLCALL
+SDL_GetWindowMaximumSize(SDL_Window *window, int *w, int *h)
+{
+    SDL3_GetWindowMaximumSize(window, w, h);
+}
+
+DECLSPEC void SDLCALL
+SDL_SetWindowBordered(SDL_Window *window, SDL_bool bordered)
+{
+    SDL3_SetWindowBordered(window, bordered);
+}
+
+DECLSPEC void SDLCALL
+SDL_SetWindowResizable(SDL_Window *window, SDL_bool resizable)
+{
+    SDL3_SetWindowResizable(window, resizable);
+}
+
+DECLSPEC void SDLCALL
+SDL_SetWindowAlwaysOnTop(SDL_Window *window, SDL_bool on_top)
+{
+    SDL3_SetWindowAlwaysOnTop(window, on_top);
+}
+
+DECLSPEC void SDLCALL
+SDL_ShowWindow(SDL_Window *window)
+{
+    SDL3_ShowWindow(window);
+}
+
+DECLSPEC void SDLCALL
+SDL_HideWindow(SDL_Window *window)
+{
+    SDL3_HideWindow(window);
+}
+
+DECLSPEC void SDLCALL
+SDL_RaiseWindow(SDL_Window *window)
+{
+    SDL3_RaiseWindow(window);
+}
+
+DECLSPEC void SDLCALL
+SDL_MaximizeWindow(SDL_Window *window)
+{
+    SDL3_MaximizeWindow(window);
+}
+
+DECLSPEC void SDLCALL
+SDL_MinimizeWindow(SDL_Window *window)
+{
+    SDL3_MinimizeWindow(window);
+}
+
+DECLSPEC void SDLCALL
+SDL_RestoreWindow(SDL_Window *window)
+{
+    SDL3_RestoreWindow(window);
+}
+
+DECLSPEC void SDLCALL
+SDL_SetWindowGrab(SDL_Window *window, SDL_bool grabbed)
+{
+    SDL3_SetWindowGrab(window, grabbed);
+}
+
+DECLSPEC void SDLCALL
+SDL_SetWindowKeyboardGrab(SDL_Window *window, SDL_bool grabbed)
+{
+    SDL3_SetWindowKeyboardGrab(window, grabbed);
+}
+
+DECLSPEC void SDLCALL
+SDL_SetWindowMouseGrab(SDL_Window *window, SDL_bool grabbed)
+{
+    SDL3_SetWindowMouseGrab(window, grabbed);
+}
+
+DECLSPEC void SDLCALL
+SDL_DestroyWindow(SDL_Window *window)
+{
+    SDL3_DestroyWindow(window);
+}
+
+DECLSPEC void SDLCALL
+SDL_GL_DeleteContext(SDL_GLContext context)
+{
+    SDL3_GL_DeleteContext(context);
+}
 /* SDL3 added a return value. We just throw it away for SDL2. */
 DECLSPEC void SDLCALL
 SDL_GL_SwapWindow(SDL_Window *window)
diff --git a/src/sdl3_syms.h b/src/sdl3_syms.h
index 5a7fb12..c863b14 100644
--- a/src/sdl3_syms.h
+++ b/src/sdl3_syms.h
@@ -107,7 +107,7 @@ SDL3_SYM(SDL_AudioStatus,GetAudioDeviceStatus,(SDL_AudioDeviceID a),(a),return)
 SDL3_SYM(void,PlayAudioDevice,(SDL_AudioDeviceID a),(a),)
 SDL3_SYM(void,PauseAudioDevice,(SDL_AudioDeviceID a),(a),)
 SDL3_SYM(SDL_AudioSpec*,LoadWAV_RW,(SDL_RWops *a, int b, SDL_AudioSpec *c, Uint8 **d, Uint32 *e),(a,b,c,d,e),return)
-SDL3_SYM_PASSTHROUGH(void,MixAudioFormat,(Uint8 *a, const Uint8 *b, SDL_AudioFormat c, Uint32 d, int e),(a,b,c,d,e),)
+SDL3_SYM(int,MixAudioFormat,(Uint8 *a, const Uint8 *b, SDL_AudioFormat c, Uint32 d, int e),(a,b,c,d,e),return)
 SDL3_SYM(void,LockAudioDevice,(SDL_AudioDeviceID a),(a),)
 SDL3_SYM(void,UnlockAudioDevice,(SDL_AudioDeviceID a),(a),)
 SDL3_SYM(void,CloseAudioDevice,(SDL_AudioDeviceID a),(a),)
@@ -211,7 +211,7 @@ SDL3_SYM_RENAMED(void,JoystickUpdate,UpdateJoysticks,(void),(),)
 SDL3_SYM_RENAMED(Sint16,JoystickGetAxis,GetJoystickAxis,(SDL_Joystick *a, int b),(a,b),return)
 SDL3_SYM_RENAMED(Uint8,JoystickGetHat,GetJoystickHat,(SDL_Joystick *a, int b),(a,b),return)
 SDL3_SYM_RENAMED(Uint8,JoystickGetButton,GetJoystickButton,(SDL_Joystick *a, int b),(a,b),return)
-SDL3_SYM_RENAMED(void,JoystickClose,CloseJoystick,(SDL_Joystick *a),(a),)
+SDL3_SYM(int,CloseJoystick,(SDL_Joystick *a),(a),return)
 SDL3_SYM_PASSTHROUGH(SDL_Window*,GetKeyboardFocus,(void),(),return)
 SDL3_SYM_PASSTHROUGH(const Uint8*,GetKeyboardState,(int *a),(a),return)
 SDL3_SYM_PASSTHROUGH(SDL_Keymod,GetModState,(void),(),return)
@@ -225,7 +225,7 @@ SDL3_SYM_PASSTHROUGH(SDL_Keycode,GetKeyFromName,(const char *a),(a),return)
 SDL3_SYM_PASSTHROUGH(void,StartTextInput,(void),(),)
 SDL3_SYM_RENAMED(SDL_bool,IsTextInputActive,TextInputActive,(void),(),return)
 SDL3_SYM_PASSTHROUGH(void,StopTextInput,(void),(),)
-SDL3_SYM_PASSTHROUGH(void,SetTextInputRect,(const SDL_Rect *a),(a),)
+SDL3_SYM(int,SetTextInputRect,(const SDL_Rect *a),(a),return)
 SDL3_SYM_PASSTHROUGH(SDL_bool,HasScreenKeyboardSupport,(void),(),return)
 SDL3_SYM_RENAMED(SDL_bool,IsScreenKeyboardShown,ScreenKeyboardShown,(SDL_Window *a),(a),return)
 SDL3_SYM_PASSTHROUGH(void*,LoadObject,(const char *a),(a),return)
@@ -250,7 +250,7 @@ SDL3_SYM_PASSTHROUGH(SDL_bool,GetRelativeMouseMode,(void),(),return)
 SDL3_SYM_PASSTHROUGH(SDL_Cursor*,CreateCursor,(const Uint8 *a, const Uint8 *b, int c, int d, int e, int f),(a,b,c,d,e,f),return)
 SDL3_SYM_PASSTHROUGH(SDL_Cursor*,CreateColorCursor,(SDL_Surface *a, int b, int c),(a,b,c),return)
 SDL3_SYM_PASSTHROUGH(SDL_Cursor*,CreateSystemCursor,(SDL_SystemCursor a),(a),return)
-SDL3_SYM_PASSTHROUGH(void,SetCursor,(SDL_Cursor *a),(a),)
+SDL3_SYM(int,SetCursor,(SDL_Cursor *a),(a),return)
 SDL3_SYM_PASSTHROUGH(SDL_Cursor*,GetCursor,(void),(),return)
 SDL3_SYM_PASSTHROUGH(SDL_Cursor*,GetDefaultCursor,(void),(),return)
 SDL3_SYM_RENAMED(void,FreeCursor,DestroyCursor,(SDL_Cursor *a),(a),)
@@ -276,11 +276,11 @@ SDL3_SYM_PASSTHROUGH(const char*,GetPixelFormatName,(Uint32 a),(a),return)
 SDL3_SYM_RENAMED(SDL_bool,PixelFormatEnumToMasks,GetMasksForPixelFormatEnum,(Uint32 a, int *b, Uint32 *c, Uint32 *d, Uint32 *e, Uint32 *f),(a,b,c,d,e,f),return)
 SDL3_SYM_RENAMED(Uint32,MasksToPixelFormatEnum,GetPixelFormatEnumForMasks,(int a, Uint32 b, Uint32 c, Uint32 d, Uint32 e),(a,b,c,d,e),return)
 SDL3_SYM_RENAMED(SDL_PixelFormat*,AllocFormat,CreatePixelFormat,(Uint32 a),(a),return)
-SDL3_SYM_RENAMED(void,FreeFormat,DestroyPixelFormat,(SDL_PixelFormat *a),(a),)
+SDL3_SYM(int,DestroyPixelFormat,(SDL_PixelFormat *a),(a),return)
 SDL3_SYM_RENAMED(SDL_Palette*,AllocPalette,CreatePalette,(int a),(a),return)
 SDL3_SYM_PASSTHROUGH(int,SetPixelFormatPalette,(SDL_PixelFormat *a, SDL_Palette *b),(a,b),return)
 SDL3_SYM_PASSTHROUGH(int,SetPaletteColors,(SDL_Palette *a, const SDL_Color *b, int c, int d),(a,b,c,d),return)
-SDL3_SYM_RENAMED(void,FreePalette,DestroyPalette,(SDL_Palette *a),(a),)
+SDL3_SYM(int,DestroyPalette,(SDL_Palette *a),(a),return)
 SDL3_SYM_PASSTHROUGH(Uint32,MapRGB,(const SDL_PixelFormat *a, Uint8 b, Uint8 c, Uint8 d),(a,b,c,d),return)
 SDL3_SYM_PASSTHROUGH(Uint32,MapRGBA,(const SDL_PixelFormat *a, Uint8 b, Uint8 c, Uint8 d, Uint8 e),(a,b,c,d,e),return)
 SDL3_SYM_PASSTHROUGH(void,GetRGB,(Uint32 a, const SDL_PixelFormat *b, Uint8 *c, Uint8 *d, Uint8 *e),(a,b,c,d,e),)
@@ -289,7 +289,7 @@ SDL3_SYM_PASSTHROUGH(const char*,GetPlatform,(void),(),return)
 SDL3_SYM_PASSTHROUGH(SDL_PowerState,GetPowerInfo,(int *a, int *b),(a,b),return)
 SDL3_SYM_RENAMED(SDL_bool,HasIntersection,HasRectIntersection,(const SDL_Rect *a, const SDL_Rect *b),(a,b),return)
 SDL3_SYM_RENAMED(SDL_bool,IntersectRect,GetRectIntersection,(const SDL_Rect *a, const SDL_Rect *b, SDL_Rect *c),(a,b,c),return)
-SDL3_SYM_RENAMED(void,UnionRect,GetRectUnion,(const SDL_Rect *a, const SDL_Rect *b, SDL_Rect *c),(a,b,c),)
+SDL3_SYM(int,GetRectUnion,(const SDL_Rect *a, const SDL_Rect *b, SDL_Rect *c),(a,b,c),return)
 SDL3_SYM_RENAMED(SDL_bool,EnclosePoints,GetRectEnclosingPoints,(const SDL_Point *a, int b, const SDL_Rect *c, SDL_Rect *d),(a,b,c,d),return)
 SDL3_SYM_RENAMED(SDL_bool,IntersectRectAndLine,GetRectAndLineIntersection,(const SDL_Rect *a, int *b, int *c, int *d, int *e),(a,b,c,d,e),return)
 SDL3_SYM_PASSTHROUGH(int,GetNumRenderDrivers,(void),(),return)
@@ -312,7 +312,7 @@ SDL3_SYM_PASSTHROUGH(int,GetTextureBlendMode,(SDL_Texture *a, SDL_BlendMode *b),
 SDL3_SYM_PASSTHROUGH(int,UpdateTexture,(SDL_Texture *a, const SDL_Rect *b, const void *c, int d),(a,b,c,d),return)
 SDL3_SYM_PASSTHROUGH(int,UpdateYUVTexture,(SDL_Texture *a, const SDL_Rect *b, const Uint8 *c, int d, const Uint8 *e, int f, const Uint8 *g, int h),(a,b,c,d,e,f,g,h),return)
 SDL3_SYM_PASSTHROUGH(int,LockTexture,(SDL_Texture *a, const SDL_Rect *b, void **c, int *d),(a,b,c,d),return)
-SDL3_SYM_PASSTHROUGH(void,UnlockTexture,(SDL_Texture *a),(a),)
+SDL3_SYM(int,UnlockTexture,(SDL_Texture *a),(a),return)
 SDL3_SYM_PASSTHROUGH(int,SetRenderTarget,(SDL_Renderer *a, SDL_Texture *b),(a,b),return)
 SDL3_SYM_PASSTHROUGH(SDL_Texture*,GetRenderTarget,(SDL_Renderer *a),(a),return)
 SDL3_SYM_RENAMED(int,RenderSetViewport,SetRenderViewport,(SDL_Renderer *a, const SDL_Rect *b),(a,b),return)
@@ -327,9 +327,9 @@ SDL3_SYM_PASSTHROUGH(int,SetRenderDrawBlendMode,(SDL_Renderer *a, SDL_BlendMode
 SDL3_SYM_PASSTHROUGH(int,GetRenderDrawBlendMode,(SDL_Renderer *a, SDL_BlendMode *b),(a,b),return)
 SDL3_SYM_PASSTHROUGH(int,RenderClear,(SDL_Renderer *a),(a),return)
 SDL3_SYM_PASSTHROUGH(int,RenderReadPixels,(SDL_Renderer *a, const SDL_Rect *b, Uint32 c, void *d, int e),(a,b,c,d,e),return)
-SDL3_SYM_PASSTHROUGH(void,RenderPresent,(SDL_Renderer *a),(a),)
-SDL3_SYM_PASSTHROUGH(void,DestroyTexture,(SDL_Texture *a),(a),)
-SDL3_SYM_PASSTHROUGH(void,DestroyRenderer,(SDL_Renderer *a),(a),)
+SDL3_SYM(int,RenderPresent,(SDL_Renderer *a),(a),return)
+SDL3_SYM(int,DestroyTexture,(SDL_Texture *a),(a),return)
+SDL3_SYM(int,DestroyRenderer,(SDL_Renderer *a),(a),return)
 SDL3_SYM_PASSTHROUGH(int,GL_BindTexture,(SDL_Texture *a, float *b, float *c),(a,b,c),return)
 SDL3_SYM_PASSTHROUGH(int,GL_UnbindTexture,(SDL_Texture *a),(a),return)
 SDL3_SYM(SDL_RWops*,RWFromFile,(const char *a, const char *b),(a,b),return)
@@ -493,28 +493,28 @@ SDL3_SYM(int,SetWindowTitle,(SDL_Window *a, const char *b),(a,b),return)
 SDL3_SYM(int,SetWindowIcon,(SDL_Window *a, SDL_Surface *b),(a,b),return)
 SDL3_SYM_PASSTHROUGH(void*,SetWindowData,(SDL_Window *a, const char *b, void *c),(a,b,c),return)
 SDL3_SYM_PASSTHROUGH(void*,GetWindowData,(SDL_Window *a, const char *b),(a,b),return)
-SDL3_SYM_PASSTHROUGH(void,SetWindowPosition,(SDL_Window *a, int b, int c),(a,b,c),)
-SDL3_SYM_PASSTHROUGH(void,GetWindowPosition,(SDL_Window *a, int *b, int *c),(a,b,c),)
-SDL3_SYM_PASSTHROUGH(void,GetWindowSize,(SDL_Window *a, int *b, int *c),(a,b,c),)
-SDL3_SYM_PASSTHROUGH(void,GetWindowMinimumSize,(SDL_Window *a, int *b, int *c),(a,b,c),)
+SDL3_SYM(int,SetWindowPosition,(SDL_Window *a, int b, int c),(a,b,c),return)
+SDL3_SYM(int,GetWindowPosition,(SDL_Window *a, int *b, int *c),(a,b,c),return)
+SDL3_SYM(int,GetWindowSize,(SDL_Window *a, int *b, int *c),(a,b,c),return)
+SDL3_SYM(int,GetWindowMinimumSize,(SDL_Window *a, int *b, int *c),(a,b,c),return)
 SDL3_SYM(int,SetWindowSize,(SDL_Window *a, int b, int c),(a,b,c),return)
 SDL3_SYM(int,SetWindowMinimumSize,(SDL_Window *a, int b, int c),(a,b,c),return)
 SDL3_SYM(int,SetWindowMaximumSize,(SDL_Window *a, int b, int c),(a,b,c),return)
-SDL3_SYM_PASSTHROUGH(void,GetWindowMaximumSize,(SDL_Window *a, int *b, int *c),(a,b,c),)
-SDL3_SYM_PASSTHROUGH(void,SetWindowBordered,(SDL_Window *a, SDL_bool b),(a,b),)
-SDL3_SYM_PASSTHROUGH(void,ShowWindow,(SDL_Window *a),(a),)
-SDL3_SYM_PASSTHROUGH(void,HideWindow,(SDL_Window *a),(a),)
-SDL3_SYM_PASSTHROUGH(void,RaiseWindow,(SDL_Window *a),(a),)
-SDL3_SYM_PASSTHROUGH(void,MaximizeWindow,(SDL_Window *a),(a),)
-SDL3_SYM_PASSTHROUGH(void,MinimizeWindow,(SDL_Window *a),(a),)
-SDL3_SYM_PASSTHROUGH(void,RestoreWindow,(SDL_Window *a),(a),)
+SDL3_SYM(int,GetWindowMaximumSize,(SDL_Window *a, int *b, int *c),(a,b,c),return)
+SDL3_SYM(int,SetWindowBordered,(SDL_Window *a, SDL_bool b),(a,b),return)
+SDL3_SYM(int,ShowWindow,(SDL_Window *a),(a),return)
+SDL3_SYM(int,HideWindow,(SDL_Window *a),(a),return)
+SDL3_SYM(int,RaiseWindow,(SDL_Window *a),(a),return)
+SDL3_SYM(int,MaximizeWindow,(SDL_Window *a),(a),return)
+SDL3_SYM(int,MinimizeWindow,(SDL_Window *a),(a),return)
+SDL3_SYM(int,RestoreWindow,(SDL_Window *a),(a),return)
 SDL3_SYM(int,SetWindowFullscreen,(SDL_Window *a, Uint32 b),(a,b),return)
 SDL3_SYM_PASSTHROUGH(SDL_Surface*,GetWindowSurface,(SDL_Window *a),(a),return)
 SDL3_SYM_PASSTHROUGH(int,UpdateWindowSurface,(SDL_Window *a),(a),return)
 SDL3_SYM_PASSTHROUGH(int,UpdateWindowSurfaceRects,(SDL_Window *a, const SDL_Rect *b, int c),(a,b,c),return)
-SDL3_SYM_PASSTHROUGH(void,SetWindowGrab,(SDL_Window *a, SDL_bool b),(a,b),)
+SDL3_SYM(int,SetWindowGrab,(SDL_Window *a, SDL_bool b),(a,b),return)
 SDL3_SYM_PASSTHROUGH(SDL_bool,GetWindowGrab,(SDL_Window *a),(a),return)
-SDL3_SYM_PASSTHROUGH(void,DestroyWindow,(SDL_Window *a),(a),)
+SDL3_SYM(int,DestroyWindow,(SDL_Window *a),(a),return)
 SDL3_SYM_RENAMED(SDL_bool,IsScreenSaverEnabled,ScreenSaverEnabled,(void),(),return)
 SDL3_SYM_PASSTHROUGH(void,EnableScreenSaver,(void),(),)
 SDL3_SYM_PASSTHROUGH(void,DisableScreenSaver,(void),(),)
@@ -531,7 +531,7 @@ SDL3_SYM_PASSTHROUGH(SDL_GLContext,GL_GetCurrentContext,(void),(),return)
 SDL3_SYM_PASSTHROUGH(int,GL_SetSwapInterval,(int a),(a),return)
 SDL3_SYM(int,GL_GetSwapInterval,(int *a),(a),return)
 SDL3_SYM(int,GL_SwapWindow,(SDL_Window *a),(a),return)
-SDL3_SYM_PASSTHROUGH(void,GL_DeleteContext,(SDL_GLContext a),(a),)
+SDL3_SYM(int,GL_DeleteContext,(SDL_GLContext a),(a),return)
 SDL3_SYM_PASSTHROUGH(int,vsscanf,(const char *a, const char *b, va_list c),(a,b,c),return)
 SDL3_SYM(int,AddGamepadMappingsFromRW,(SDL_RWops *a, int b),(a,b),return)
 SDL3_SYM_PASSTHROUGH(void,GL_ResetAttributes,(void),(),)
@@ -572,7 +572,7 @@ SDL3_SYM_PASSTHROUGH(int,GetWindowOpacity,(SDL_Window *a, float *b),(a,b),return
 SDL3_SYM_PASSTHROUGH(int,SetWindowInputFocus,(SDL_Window *a),(a),return)
 SDL3_SYM_PASSTHROUGH(int,SetWindowModalFor,(SDL_Window *a, SDL_Window *b),(a,b),return)
 SDL3_SYM(Uint32,DequeueAudio,(SDL_AudioDeviceID a, void *b, Uint32 c),(a,b,c),return)
-SDL3_SYM_PASSTHROUGH(void,SetWindowResizable,(SDL_Window *a, SDL_bool b),(a,b),)
+SDL3_SYM(int,SetWindowResizable,(SDL_Window *a, SDL_bool b),(a,b),return)
 SDL3_SYM(SDL_bool,GetHintBoolean,(const char *a, SDL_bool b),(a,b),return)
 SDL3_SYM_RENAMED(Uint16,JoystickGetVendor,GetJoystickVendor,(SDL_Joystick *a),(a),return)
 SDL3_SYM_RENAMED(Uint16,JoystickGetProduct,GetJoystickProduct,(SDL_Joystick *a),(a),return)
@@ -700,7 +700,7 @@ SDL3_SYM_RENAMED(SDL_GameControllerType,GameControllerGetType,GetGamepadType,(SD
 SDL3_SYM_RENAMED(SDL_GameController*,GameControllerFromPlayerIndex,GetGamepadFromPlayerIndex,(int a),(a),return)
 SDL3_SYM_RENAMED(void,GameControllerSetPlayerIndex,SetGamepadPlayerIndex,(SDL_GameController *a, int b),(a,b),)
 SDL3_SYM_RENAMED(SDL_Joystick*,JoystickFromPlayerIndex,GetJoystickFromPlayerIndex,(int a),(a),return)
-SDL3_SYM_RENAMED(void,JoystickSetPlayerIndex,SetJoystickPlayerIndex,(SDL_Joystick *a, int b),(a,b),)
+SDL3_SYM(int,SetJoystickPlayerIndex,(SDL_Joystick *a, int b),(a,b),return)
 SDL3_SYM_PASSTHROUGH(int,SetTextureScaleMode,(SDL_Texture *a, SDL_ScaleMode b),(a,b),return)
 SDL3_SYM_PASSTHROUGH(int,GetTextureScaleMode,(SDL_Texture *a, SDL_ScaleMode *b),(a,b),return)
 SDL3_SYM_PASSTHROUGH(void,OnApplicationWillTerminate,(void),(),)
@@ -764,8 +764,8 @@ SDL3_SYM_PASSTHROUGH(int,SoftStretchLinear,(SDL_Surface *a, const SDL_Rect *b, S
 SDL3_SYM_RENAMED(ID3D11Device*,RenderGetD3D11Device,GetRenderD3D11Device,(SDL_Renderer *a),(a),return)
 #endif
 SDL3_SYM_PASSTHROUGH(int,UpdateNVTexture,(SDL_Texture *a, const SDL_Rect *b, const Uint8 *c, int d, const Uint8 *e, int f),(a,b,c,d,e,f),return)
-SDL3_SYM_PASSTHROUGH(void,SetWindowKeyboardGrab,(SDL_Window *a, SDL_bool b),(a,b),)
-SDL3_SYM_PASSTHROUGH(void,SetWindowMouseGrab,(SDL_Window *a, SDL_bool b),(a,b),)
+SDL3_SYM(int,SetWindowKeyboardGrab,(SDL_Window *a, SDL_bool b),(a,b),return)
+SDL3_SYM(int,SetWindowMouseGrab,(SDL_Window *a, SDL_bool b),(a,b),return)
 SDL3_SYM_PASSTHROUGH(SDL_bool,GetWindowKeyboardGrab,(SDL_Window *a),(a),return)
 SDL3_SYM_PASSTHROUGH(SDL_bool,GetWindowMouseGrab,(SDL_Window *a),(a),return)
 SDL3_SYM_PASSTHROUGH(int,isalpha,(int a),(a),return)
@@ -781,7 +781,7 @@ SDL3_SYM_PASSTHROUGH(int,AndroidShowToast,(const char *a, int b, int c, int d, i
 #endif
 SDL3_SYM_PASSTHROUGH(int,GetAudioDeviceSpec,(int a, int b, SDL_AudioSpec *c),(a,b,c),return)
 SDL3_SYM_PASSTHROUGH(void,TLSCleanup,(void),(),)
-SDL3_SYM_PASSTHROUGH(void,SetWindowAlwaysOnTop,(SDL_Window *a, SDL_bool b),(a,b),)
+SDL3_SYM(int,SetWindowAlwaysOnTop,(SDL_Window *a, SDL_bool b),(a,b),return)
 SDL3_SYM_PASSTHROUGH(int,FlashWindow,(SDL_Window *a, SDL_FlashOperation b),(a,b),return)
 SDL3_SYM_RENAMED(int,GameControllerSendEffect,SendGamepadEffect,(SDL_GameController *a, const void *b, int c),(a,b,c),return)
 SDL3_SYM_RENAMED(int,JoystickSendEffect,SendJoystickEffect,(SDL_Joystick *a, const void *b, int c),(a,b,c),return)
@@ -812,7 +812,7 @@ SDL3_SYM_PASSTHROUGH(int,hid_read,(SDL_hid_device *a, unsigned char *b, size_t c
 SDL3_SYM_PASSTHROUGH(int,hid_set_nonblocking,(SDL_hid_device *a, int b),(a,b),return)
 SDL3_SYM_PASSTHROUGH(int,hid_send_feature_report,(SDL_hid_device *a, const unsigned char *b, size_t c),(a,b,c),return)
 SDL3_SYM_PASSTHROUGH(int,hid_get_feature_report,(SDL_hid_device *a, unsigned char *b, size_t c),(a,b,c),return)
-SDL3_SYM_PASSTHROUGH(void,hid_close,(SDL_hid_device *a),(a),)
+SDL3_SYM(int,hid_close,(SDL_hid_device *a),(a),return)
 SDL3_SYM_PASSTHROUGH(int,hid_get_manufacturer_string,(SDL_hid_device *a, wchar_t *b, size_t c),(a,b,c),return)
 SDL3_SYM_PASSTHROUGH(int,hid_get_product_string,(SDL_hid_device *a, wchar_t *b, size_t c),(a,b,c),return)
 SDL3_SYM_PASSTHROUGH(int,hid_get_serial_number_string,(SDL_hid_device *a, wchar_t *b, size_t c),(a,b,c),return)
@@ -835,7 +835,7 @@ SDL3_SYM_PASSTHROUGH(void,ClearComposition,(void),(),)
 SDL3_SYM_RENAMED(SDL_bool,IsTextInputShown,TextInputShown,(void),(),return)
 SDL3_SYM_RENAMED(SDL_bool,HasIntersectionF,HasRectIntersectionFloat,(const SDL_FRect *a, const SDL_FRect *b),(a,b),return)
 SDL3_SYM_RENAMED(SDL_bool,IntersectFRect,GetRectIntersectionFloat,(const SDL_FRect *a, const SDL_FRect *b, SDL_FRect *c),(a,b,c),return)
-SDL3_SYM_RENAMED(void,UnionFRect,GetRectUnionFloat,(const SDL_FRect *a, const SDL_FRect *b, SDL_FRect *c),(a,b,c),)
+SDL3_SYM(int,GetRectUnionFloat,(const SDL_FRect *a, const SDL_FRect *b, SDL_FRect *c),(a,b,c),return)
 SDL3_SYM_RENAMED(SDL_bool,EncloseFPoints,GetRectEnclosingPointsFloat,(const SDL_FPoint *a, int b, const SDL_FRect *c, SDL_FRect *d),(a,b,c,d),return)
 SDL3_SYM_RENAMED(SDL_bool,IntersectFRectAndLine,GetRectAndLineIntersectionFloat,(const SDL_FRect *a, float *b, float *c, float *d, float *e),(a,b,c,d,e),return)
 SDL3_SYM_RENAMED(SDL_Window*,RenderGetWindow,GetRenderWindow,(SDL_Renderer *a),(a),return)
@@ -861,7 +861,7 @@ SDL3_SYM_PASSTHROUGH(void,ResetKeyboard,(void),(),)
 SDL3_SYM_PASSTHROUGH(int,GetDefaultAudioInfo,(char **a, SDL_AudioSpec *b, int c),(a,b,c),return)
 SDL3_SYM(SDL_bool,ResetHint,(const char *a),(a),return)
 SDL3_SYM_PASSTHROUGH(Uint16,crc16,(Uint16 a, const void *b, size_t c),(a,b,c),return)
-SDL3_SYM_PASSTHROUGH(void,GetWindowSizeInPixels,(SDL_Window *a, int *b, int *c),(a,b,c),)
+SDL3_SYM(int,GetWindowSizeInPixels,(SDL_Window *a, int *b, int *c),(a,b,c),return)
 SDL3_SYM_PASSTHROUGH(void,GetJoystickGUIDInfo,(SDL_JoystickGUID a, Uint16 *b, Uint16 *c, Uint16 *d, Uint16 *e),(a,b,c,d,e),)
 SDL3_SYM_PASSTHROUGH(int,SetPrimarySelectionText,(const char *a),(a),return)
 SDL3_SYM_PASSTHROUGH(char*,GetPrimarySelectionText,(void),(),return)