sdl2-compat: updated sdl3_include_wrapper.h from latest SDL3 (2c894)

From 2c894f32f80821c92b36aebb7ce8c59558b21f8f Mon Sep 17 00:00:00 2001
From: Ozkan Sezer <[EMAIL REDACTED]>
Date: Mon, 18 Mar 2024 03:30:50 +0300
Subject: [PATCH] updated sdl3_include_wrapper.h from latest SDL3

fixes build after SDL_LogGetOutputFunction and SDL_LogSetOutputFunction
rename in SDL3.
---
 src/sdl3_include_wrapper.h | 117 +++++++++++++++++++++++++++++++++++--
 src/sdl3_syms.h            |   4 +-
 2 files changed, 113 insertions(+), 8 deletions(-)

diff --git a/src/sdl3_include_wrapper.h b/src/sdl3_include_wrapper.h
index fe1fe60..a7e206f 100644
--- a/src/sdl3_include_wrapper.h
+++ b/src/sdl3_include_wrapper.h
@@ -455,14 +455,14 @@
 #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_LogGetOutputFunction IGNORE_THIS_VERSION_OF_SDL_LogGetOutputFunction
+#define SDL_GetLogOutputFunction IGNORE_THIS_VERSION_OF_SDL_GetLogOutputFunction
 #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_LogSetOutputFunction IGNORE_THIS_VERSION_OF_SDL_LogSetOutputFunction
+#define SDL_SetLogOutputFunction IGNORE_THIS_VERSION_OF_SDL_SetLogOutputFunction
 #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
@@ -1010,6 +1010,27 @@
 #define SDL_OpenIO IGNORE_THIS_VERSION_OF_SDL_OpenIO
 #define SDL_CloseIO IGNORE_THIS_VERSION_OF_SDL_CloseIO
 #define SDL_GetIOStatus IGNORE_THIS_VERSION_OF_SDL_GetIOStatus
+#define SDL_OpenTitleStorage IGNORE_THIS_VERSION_OF_SDL_OpenTitleStorage
+#define SDL_OpenUserStorage IGNORE_THIS_VERSION_OF_SDL_OpenUserStorage
+#define SDL_OpenStorage IGNORE_THIS_VERSION_OF_SDL_OpenStorage
+#define SDL_CloseStorage IGNORE_THIS_VERSION_OF_SDL_CloseStorage
+#define SDL_StorageReady IGNORE_THIS_VERSION_OF_SDL_StorageReady
+#define SDL_GetStorageFileSize IGNORE_THIS_VERSION_OF_SDL_GetStorageFileSize
+#define SDL_ReadStorageFile IGNORE_THIS_VERSION_OF_SDL_ReadStorageFile
+#define SDL_GetStorageSpaceRemaining IGNORE_THIS_VERSION_OF_SDL_GetStorageSpaceRemaining
+#define SDL_CreateDirectory IGNORE_THIS_VERSION_OF_SDL_CreateDirectory
+#define SDL_EnumerateDirectory IGNORE_THIS_VERSION_OF_SDL_EnumerateDirectory
+#define SDL_RemovePath IGNORE_THIS_VERSION_OF_SDL_RemovePath
+#define SDL_RenamePath IGNORE_THIS_VERSION_OF_SDL_RenamePath
+#define SDL_GetPathInfo IGNORE_THIS_VERSION_OF_SDL_GetPathInfo
+#define SDL_FileTimeToWindows IGNORE_THIS_VERSION_OF_SDL_FileTimeToWindows
+#define SDL_OpenFileStorage IGNORE_THIS_VERSION_OF_SDL_OpenFileStorage
+#define SDL_CreateStorageDirectory IGNORE_THIS_VERSION_OF_SDL_CreateStorageDirectory
+#define SDL_EnumerateStorageDirectory IGNORE_THIS_VERSION_OF_SDL_EnumerateStorageDirectory
+#define SDL_RemoveStoragePath IGNORE_THIS_VERSION_OF_SDL_RemoveStoragePath
+#define SDL_RenameStoragePath IGNORE_THIS_VERSION_OF_SDL_RenameStoragePath
+#define SDL_GetStoragePathInfo IGNORE_THIS_VERSION_OF_SDL_GetStoragePathInfo
+#define SDL_FileTimeFromWindows IGNORE_THIS_VERSION_OF_SDL_FileTimeFromWindows
 
 
 #define SDL_FUNCTION_POINTER_IS_VOID_POINTER 1
@@ -2722,8 +2743,8 @@
 #undef SDL_LogError
 #endif
 
-#ifdef SDL_LogGetOutputFunction
-#undef SDL_LogGetOutputFunction
+#ifdef SDL_GetLogOutputFunction
+#undef SDL_GetLogOutputFunction
 #endif
 
 #ifdef SDL_LogGetPriority
@@ -2750,8 +2771,8 @@
 #undef SDL_LogSetAllPriority
 #endif
 
-#ifdef SDL_LogSetOutputFunction
-#undef SDL_LogSetOutputFunction
+#ifdef SDL_SetLogOutputFunction
+#undef SDL_SetLogOutputFunction
 #endif
 
 #ifdef SDL_LogSetPriority
@@ -4942,6 +4963,90 @@
 #undef SDL_GetIOStatus
 #endif
 
+#ifdef SDL_OpenTitleStorage
+#undef SDL_OpenTitleStorage
+#endif
+
+#ifdef SDL_OpenUserStorage
+#undef SDL_OpenUserStorage
+#endif
+
+#ifdef SDL_OpenStorage
+#undef SDL_OpenStorage
+#endif
+
+#ifdef SDL_CloseStorage
+#undef SDL_CloseStorage
+#endif
+
+#ifdef SDL_StorageReady
+#undef SDL_StorageReady
+#endif
+
+#ifdef SDL_GetStorageFileSize
+#undef SDL_GetStorageFileSize
+#endif
+
+#ifdef SDL_ReadStorageFile
+#undef SDL_ReadStorageFile
+#endif
+
+#ifdef SDL_GetStorageSpaceRemaining
+#undef SDL_GetStorageSpaceRemaining
+#endif
+
+#ifdef SDL_CreateDirectory
+#undef SDL_CreateDirectory
+#endif
+
+#ifdef SDL_EnumerateDirectory
+#undef SDL_EnumerateDirectory
+#endif
+
+#ifdef SDL_RemovePath
+#undef SDL_RemovePath
+#endif
+
+#ifdef SDL_RenamePath
+#undef SDL_RenamePath
+#endif
+
+#ifdef SDL_GetPathInfo
+#undef SDL_GetPathInfo
+#endif
+
+#ifdef SDL_FileTimeToWindows
+#undef SDL_FileTimeToWindows
+#endif
+
+#ifdef SDL_OpenFileStorage
+#undef SDL_OpenFileStorage
+#endif
+
+#ifdef SDL_CreateStorageDirectory
+#undef SDL_CreateStorageDirectory
+#endif
+
+#ifdef SDL_EnumerateStorageDirectory
+#undef SDL_EnumerateStorageDirectory
+#endif
+
+#ifdef SDL_RemoveStoragePath
+#undef SDL_RemoveStoragePath
+#endif
+
+#ifdef SDL_RenameStoragePath
+#undef SDL_RenameStoragePath
+#endif
+
+#ifdef SDL_GetStoragePathInfo
+#undef SDL_GetStoragePathInfo
+#endif
+
+#ifdef SDL_FileTimeFromWindows
+#undef SDL_FileTimeFromWindows
+#endif
+
 #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 aa0dba7..84da403 100644
--- a/src/sdl3_syms.h
+++ b/src/sdl3_syms.h
@@ -244,8 +244,8 @@ 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_PASSTHROUGH(void,LogMessageV,(int a, SDL_LogPriority b, const char *c, va_list d),(a,b,c,d),)
-SDL3_SYM_PASSTHROUGH(void,LogGetOutputFunction,(SDL_LogOutputFunction *a, void **b),(a,b),)
-SDL3_SYM_PASSTHROUGH(void,LogSetOutputFunction,(SDL_LogOutputFunction a, void *b),(a,b),)
+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),)
 SDL3_SYM_PASSTHROUGH(void,SetMainReady,(void),(),)
 SDL3_SYM_PASSTHROUGH(int,ShowMessageBox,(const SDL_MessageBoxData *a, int *b),(a,b),return)
 SDL3_SYM_PASSTHROUGH(int,ShowSimpleMessageBox,(Uint32 a, const char *b, const char *c, SDL_Window *d),(a,b,c,d),return)