sdl2-compat: sync with latest SDL2 and SDL3 (91138)

From 91138cce17641dd5965c0d094a60f46a7aed13e4 Mon Sep 17 00:00:00 2001
From: Ozkan Sezer <[EMAIL REDACTED]>
Date: Fri, 8 Nov 2024 18:41:02 +0300
Subject: [PATCH] sync with latest SDL2 and SDL3

---
 include/SDL2/SDL_stdinc.h      |  4 ++--
 src/sdl3_include_wrapper.h     | 10 ++++++++++
 test/testautomation_keyboard.c |  4 ++--
 3 files changed, 14 insertions(+), 4 deletions(-)

diff --git a/include/SDL2/SDL_stdinc.h b/include/SDL2/SDL_stdinc.h
index e77a248..a0b64e8 100644
--- a/include/SDL2/SDL_stdinc.h
+++ b/include/SDL2/SDL_stdinc.h
@@ -268,8 +268,8 @@ typedef uint64_t Uint64;
 #ifndef SDL_PRIs64
 #if defined(__WIN32__) || defined(__GDK__)
 #define SDL_PRIs64 "I64d"
-#elif defined(PRIs64)
-#define SDL_PRIs64 PRIs64
+#elif defined(PRId64)
+#define SDL_PRIs64 PRId64
 #elif defined(__LP64__) && !defined(__APPLE__) && !defined(__EMSCRIPTEN__)
 #define SDL_PRIs64 "ld"
 #else
diff --git a/src/sdl3_include_wrapper.h b/src/sdl3_include_wrapper.h
index c320f35..32d4935 100644
--- a/src/sdl3_include_wrapper.h
+++ b/src/sdl3_include_wrapper.h
@@ -1216,6 +1216,8 @@
 #define SDL_RenderDebugText IGNORE_THIS_VERSION_OF_SDL_RenderDebugText
 #define SDL_GetSandbox IGNORE_THIS_VERSION_OF_SDL_GetSandbox
 #define SDL_CancelGPUCommandBuffer IGNORE_THIS_VERSION_OF_SDL_CancelGPUCommandBuffer
+#define SDL_SaveFile_IO IGNORE_THIS_VERSION_OF_SDL_SaveFile_IO
+#define SDL_SaveFile IGNORE_THIS_VERSION_OF_SDL_SaveFile
 
 
 #define SDL_FUNCTION_POINTER_IS_VOID_POINTER 1
@@ -5972,6 +5974,14 @@
 #undef SDL_CancelGPUCommandBuffer
 #endif
 
+#ifdef SDL_SaveFile_IO
+#undef SDL_SaveFile_IO
+#endif
+
+#ifdef SDL_SaveFile
+#undef SDL_SaveFile
+#endif
+
 #undef SDL_ThreadID /* see at top. */
 
 /* dump the macro CreateThread versions, too. */
diff --git a/test/testautomation_keyboard.c b/test/testautomation_keyboard.c
index d59f2fd..bbbe4e7 100644
--- a/test/testautomation_keyboard.c
+++ b/test/testautomation_keyboard.c
@@ -127,9 +127,9 @@ int keyboard_getKeyFromScancode(void *arg)
     SDL_Keycode result;
 
     /* Case where input is valid */
-    result = SDL_GetKeyFromScancode(SDL_SCANCODE_A);
+    result = SDL_GetKeyFromScancode(SDL_SCANCODE_SPACE);
     SDLTest_AssertPass("Call to SDL_GetKeyFromScancode(valid)");
-    SDLTest_AssertCheck(result == SDLK_a, "Verify result from call, expected: %i, got: %" SDL_PRIs32, SDLK_a, result);
+    SDLTest_AssertCheck(result == SDLK_SPACE, "Verify result from call, expected: %i, got: %" SDL_PRIs32, SDLK_SPACE, result);
 
     /* Case where input is zero */
     result = SDL_GetKeyFromScancode(0);