sdl2-compat: updated after Log and SIMDAlloc api renames in SDL3

From f2127b8762447d77e0fcfd77f6ec65ba662e79d2 Mon Sep 17 00:00:00 2001
From: Ozkan Sezer <[EMAIL REDACTED]>
Date: Thu, 16 May 2024 21:23:56 +0300
Subject: [PATCH] updated after Log and SIMDAlloc api renames in SDL3

---
 src/sdl2_compat.c          |  4 +--
 src/sdl3_include_wrapper.h | 52 +++++++++++++++++++-------------------
 src/sdl3_syms.h            | 10 ++++----
 3 files changed, 33 insertions(+), 33 deletions(-)

diff --git a/src/sdl2_compat.c b/src/sdl2_compat.c
index b38d974..16c6d20 100644
--- a/src/sdl2_compat.c
+++ b/src/sdl2_compat.c
@@ -7821,13 +7821,13 @@ SDL_SemWaitTimeout(SDL_sem *sem, Uint32 ms)
 DECLSPEC void * SDLCALL
 SDL_SIMDAlloc(const size_t len)
 {
-    return SDL3_aligned_alloc(SDL3_SIMDGetAlignment(), len);
+    return SDL3_aligned_alloc(SDL3_GetSIMDAlignment(), len);
 }
 
 DECLSPEC void * SDLCALL
 SDL_SIMDRealloc(void *mem, const size_t len)
 {
-    const size_t alignment = SDL3_SIMDGetAlignment();
+    const size_t alignment = SDL3_GetSIMDAlignment();
     const size_t padding = (alignment - (len % alignment)) % alignment;
     Uint8 *retval = (Uint8 *)mem;
     void *oldmem = mem;
diff --git a/src/sdl3_include_wrapper.h b/src/sdl3_include_wrapper.h
index 840c314..f308504 100644
--- a/src/sdl3_include_wrapper.h
+++ b/src/sdl3_include_wrapper.h
@@ -356,6 +356,7 @@
 #define SDL_GetKeyboardState IGNORE_THIS_VERSION_OF_SDL_GetKeyboardState
 #define SDL_GetKeyboards IGNORE_THIS_VERSION_OF_SDL_GetKeyboards
 #define SDL_GetLogOutputFunction IGNORE_THIS_VERSION_OF_SDL_GetLogOutputFunction
+#define SDL_GetLogPriority IGNORE_THIS_VERSION_OF_SDL_GetLogPriority
 #define SDL_GetMasksForPixelFormatEnum IGNORE_THIS_VERSION_OF_SDL_GetMasksForPixelFormatEnum
 #define SDL_GetMaxHapticEffects IGNORE_THIS_VERSION_OF_SDL_GetMaxHapticEffects
 #define SDL_GetMaxHapticEffectsPlaying IGNORE_THIS_VERSION_OF_SDL_GetMaxHapticEffectsPlaying
@@ -441,6 +442,7 @@
 #define SDL_GetRendererInfo IGNORE_THIS_VERSION_OF_SDL_GetRendererInfo
 #define SDL_GetRendererProperties IGNORE_THIS_VERSION_OF_SDL_GetRendererProperties
 #define SDL_GetRevision IGNORE_THIS_VERSION_OF_SDL_GetRevision
+#define SDL_GetSIMDAlignment IGNORE_THIS_VERSION_OF_SDL_GetSIMDAlignment
 #define SDL_GetScancodeFromKey IGNORE_THIS_VERSION_OF_SDL_GetScancodeFromKey
 #define SDL_GetScancodeFromName IGNORE_THIS_VERSION_OF_SDL_GetScancodeFromName
 #define SDL_GetScancodeName IGNORE_THIS_VERSION_OF_SDL_GetScancodeName
@@ -587,13 +589,9 @@
 #define SDL_LogCritical IGNORE_THIS_VERSION_OF_SDL_LogCritical
 #define SDL_LogDebug IGNORE_THIS_VERSION_OF_SDL_LogDebug
 #define SDL_LogError IGNORE_THIS_VERSION_OF_SDL_LogError
-#define SDL_LogGetPriority IGNORE_THIS_VERSION_OF_SDL_LogGetPriority
 #define SDL_LogInfo IGNORE_THIS_VERSION_OF_SDL_LogInfo
 #define SDL_LogMessage IGNORE_THIS_VERSION_OF_SDL_LogMessage
 #define SDL_LogMessageV IGNORE_THIS_VERSION_OF_SDL_LogMessageV
-#define SDL_LogResetPriorities IGNORE_THIS_VERSION_OF_SDL_LogResetPriorities
-#define SDL_LogSetAllPriority IGNORE_THIS_VERSION_OF_SDL_LogSetAllPriority
-#define SDL_LogSetPriority IGNORE_THIS_VERSION_OF_SDL_LogSetPriority
 #define SDL_LogVerbose IGNORE_THIS_VERSION_OF_SDL_LogVerbose
 #define SDL_LogWarn IGNORE_THIS_VERSION_OF_SDL_LogWarn
 #define SDL_MapRGB IGNORE_THIS_VERSION_OF_SDL_MapRGB
@@ -695,6 +693,7 @@
 #define SDL_ResetHint IGNORE_THIS_VERSION_OF_SDL_ResetHint
 #define SDL_ResetHints IGNORE_THIS_VERSION_OF_SDL_ResetHints
 #define SDL_ResetKeyboard IGNORE_THIS_VERSION_OF_SDL_ResetKeyboard
+#define SDL_ResetLogPriorities IGNORE_THIS_VERSION_OF_SDL_ResetLogPriorities
 #define SDL_RestoreWindow IGNORE_THIS_VERSION_OF_SDL_RestoreWindow
 #define SDL_ResumeAudioDevice IGNORE_THIS_VERSION_OF_SDL_ResumeAudioDevice
 #define SDL_ResumeHaptic IGNORE_THIS_VERSION_OF_SDL_ResumeHaptic
@@ -704,7 +703,6 @@
 #define SDL_RumbleJoystickTriggers IGNORE_THIS_VERSION_OF_SDL_RumbleJoystickTriggers
 #define SDL_RunApp IGNORE_THIS_VERSION_OF_SDL_RunApp
 #define SDL_RunHapticEffect IGNORE_THIS_VERSION_OF_SDL_RunHapticEffect
-#define SDL_SIMDGetAlignment IGNORE_THIS_VERSION_OF_SDL_SIMDGetAlignment
 #define SDL_SaveBMP IGNORE_THIS_VERSION_OF_SDL_SaveBMP
 #define SDL_SaveBMP_IO IGNORE_THIS_VERSION_OF_SDL_SaveBMP_IO
 #define SDL_ScreenKeyboardShown IGNORE_THIS_VERSION_OF_SDL_ScreenKeyboardShown
@@ -745,6 +743,8 @@
 #define SDL_SetJoystickVirtualHat IGNORE_THIS_VERSION_OF_SDL_SetJoystickVirtualHat
 #define SDL_SetJoystickVirtualTouchpad IGNORE_THIS_VERSION_OF_SDL_SetJoystickVirtualTouchpad
 #define SDL_SetLogOutputFunction IGNORE_THIS_VERSION_OF_SDL_SetLogOutputFunction
+#define SDL_SetLogPriorities IGNORE_THIS_VERSION_OF_SDL_SetLogPriorities
+#define SDL_SetLogPriority IGNORE_THIS_VERSION_OF_SDL_SetLogPriority
 #define SDL_SetMainReady IGNORE_THIS_VERSION_OF_SDL_SetMainReady
 #define SDL_SetMemoryFunctions IGNORE_THIS_VERSION_OF_SDL_SetMemoryFunctions
 #define SDL_SetModState IGNORE_THIS_VERSION_OF_SDL_SetModState
@@ -2365,6 +2365,10 @@
 #undef SDL_GetLogOutputFunction
 #endif
 
+#ifdef SDL_GetLogPriority
+#undef SDL_GetLogPriority
+#endif
+
 #ifdef SDL_GetMasksForPixelFormatEnum
 #undef SDL_GetMasksForPixelFormatEnum
 #endif
@@ -2705,6 +2709,10 @@
 #undef SDL_GetRevision
 #endif
 
+#ifdef SDL_GetSIMDAlignment
+#undef SDL_GetSIMDAlignment
+#endif
+
 #ifdef SDL_GetScancodeFromKey
 #undef SDL_GetScancodeFromKey
 #endif
@@ -3289,10 +3297,6 @@
 #undef SDL_LogError
 #endif
 
-#ifdef SDL_LogGetPriority
-#undef SDL_LogGetPriority
-#endif
-
 #ifdef SDL_LogInfo
 #undef SDL_LogInfo
 #endif
@@ -3305,18 +3309,6 @@
 #undef SDL_LogMessageV
 #endif
 
-#ifdef SDL_LogResetPriorities
-#undef SDL_LogResetPriorities
-#endif
-
-#ifdef SDL_LogSetAllPriority
-#undef SDL_LogSetAllPriority
-#endif
-
-#ifdef SDL_LogSetPriority
-#undef SDL_LogSetPriority
-#endif
-
 #ifdef SDL_LogVerbose
 #undef SDL_LogVerbose
 #endif
@@ -3721,6 +3713,10 @@
 #undef SDL_ResetKeyboard
 #endif
 
+#ifdef SDL_ResetLogPriorities
+#undef SDL_ResetLogPriorities
+#endif
+
 #ifdef SDL_RestoreWindow
 #undef SDL_RestoreWindow
 #endif
@@ -3757,10 +3753,6 @@
 #undef SDL_RunHapticEffect
 #endif
 
-#ifdef SDL_SIMDGetAlignment
-#undef SDL_SIMDGetAlignment
-#endif
-
 #ifdef SDL_SaveBMP
 #undef SDL_SaveBMP
 #endif
@@ -3921,6 +3913,14 @@
 #undef SDL_SetLogOutputFunction
 #endif
 
+#ifdef SDL_SetLogPriorities
+#undef SDL_SetLogPriorities
+#endif
+
+#ifdef SDL_SetLogPriority
+#undef SDL_SetLogPriority
+#endif
+
 #ifdef SDL_SetMainReady
 #undef SDL_SetMainReady
 #endif
@@ -5137,7 +5137,7 @@
 #undef SDL_wcstol
 #endif
 
-#undef SDL_ThreadID /* see at top. */
+#undef SDL_ThreadID /* see at top */
 
 /* undefine these macros, too: redefine as SDL3_xxx, if needed. */
 
diff --git a/src/sdl3_syms.h b/src/sdl3_syms.h
index 2cd718a..6ae1e2a 100644
--- a/src/sdl3_syms.h
+++ b/src/sdl3_syms.h
@@ -238,10 +238,10 @@ SDL3_SYM_RENAMED(SDL_bool,IsScreenKeyboardShown,ScreenKeyboardShown,(SDL_Window
 SDL3_SYM_PASSTHROUGH(void*,LoadObject,(const char *a),(a),return)
 SDL3_SYM_PASSTHROUGH(void*,LoadFunction,(void *a, const char *b),(a,b),return)
 SDL3_SYM_PASSTHROUGH(void,UnloadObject,(void *a),(a),)
-SDL3_SYM_PASSTHROUGH(void,LogSetAllPriority,(SDL_LogPriority a),(a),)
-SDL3_SYM_PASSTHROUGH(void,LogSetPriority,(int a, SDL_LogPriority b),(a,b),)
-SDL3_SYM_PASSTHROUGH(SDL_LogPriority,LogGetPriority,(int a),(a),return)
-SDL3_SYM_PASSTHROUGH(void,LogResetPriorities,(void),(),)
+SDL3_SYM_RENAMED(void,LogSetAllPriority,SetLogPriorities,(SDL_LogPriority a),(a),)
+SDL3_SYM_RENAMED(void,LogSetPriority,SetLogPriority,(int a, SDL_LogPriority b),(a,b),)
+SDL3_SYM_RENAMED(SDL_LogPriority,LogGetPriority,GetLogPriority,(int a),(a),return)
+SDL3_SYM_RENAMED(void,LogResetPriorities,ResetLogPriorities,(void),(),)
 SDL3_SYM_PASSTHROUGH(void,LogMessageV,(int a, SDL_LogPriority b, const char *c, va_list d),(a,b,c,d),)
 SDL3_SYM_RENAMED(void,LogGetOutputFunction,GetLogOutputFunction,(SDL_LogOutputFunction *a, void **b),(a,b),)
 SDL3_SYM_RENAMED(void,LogSetOutputFunction,SetLogOutputFunction,(SDL_LogOutputFunction a, void *b),(a,b),)
@@ -609,7 +609,7 @@ SDL3_SYM(int,RenderFillRects,(SDL_Renderer *a, const SDL_FRect *b, int c),(a,b,c
 SDL3_SYM(int,RenderTexture,(SDL_Renderer *a, SDL_Texture *b, const SDL_FRect *c, const SDL_FRect *d),(a,b,c,d),return)
 SDL3_SYM(int,RenderTextureRotated,(SDL_Renderer *a, SDL_Texture *b, const SDL_FRect *c, const SDL_FRect *d, const double e, const SDL_FPoint *f, const SDL_FlipMode g),(a,b,c,d,e,f,g),return)
 SDL3_SYM_PASSTHROUGH(SDL_TouchDeviceType,GetTouchDeviceType,(SDL_TouchID a),(a),return)
-SDL3_SYM_PASSTHROUGH(size_t,SIMDGetAlignment,(void),(),return)
+SDL3_SYM_RENAMED(size_t,SIMDGetAlignment,GetSIMDAlignment,(void),(),return)
 SDL3_SYM(void*,aligned_alloc,(size_t a, size_t b),(a,b),return)
 SDL3_SYM(void,aligned_free,(void *a),(a),)
 SDL3_SYM(Sint64,GetIOSize,(SDL_IOStream *a),(a),return)