From eb354ace07ad23477946e7eff68d91197f3a7d2e Mon Sep 17 00:00:00 2001
From: Ozkan Sezer <[EMAIL REDACTED]>
Date: Thu, 10 Oct 2024 20:01:20 +0300
Subject: [PATCH] minor sync with latest SDL2 and SDL3.
---
include/SDL2/SDL_audio.h | 2 +-
include/SDL2/SDL_stdinc.h | 2 +-
src/sdl3_include_wrapper.h | 10 ++++++++++
3 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/include/SDL2/SDL_audio.h b/include/SDL2/SDL_audio.h
index 36914c43..adb89cea 100644
--- a/include/SDL2/SDL_audio.h
+++ b/include/SDL2/SDL_audio.h
@@ -591,7 +591,7 @@ extern DECLSPEC int SDLCALL SDL_GetDefaultAudioInfo(char **name,
* frames_ (with stereo output, two samples--left and right--would make a
* single sample frame). This number should be a power of two, and may be
* adjusted by the audio driver to a value more suitable for the hardware.
- * Good values seem to range between 512 and 8096 inclusive, depending on
+ * Good values seem to range between 512 and 4096 inclusive, depending on
* the application and CPU speed. Smaller values reduce latency, but can
* lead to underflow if the application is doing heavy processing and cannot
* fill the audio buffer in time. Note that the number of sample frames is
diff --git a/include/SDL2/SDL_stdinc.h b/include/SDL2/SDL_stdinc.h
index 228ddc58..3f01d56a 100644
--- a/include/SDL2/SDL_stdinc.h
+++ b/include/SDL2/SDL_stdinc.h
@@ -269,7 +269,7 @@ typedef uint64_t Uint64;
#define SDL_PRIs64 "I64d"
#elif defined(PRIs64)
#define SDL_PRIs64 PRIs64
-#elif defined(__LP64__) && !defined(__APPLE__)
+#elif defined(__LP64__) && !defined(__APPLE__) && !defined(__EMSCRIPTEN__)
#define SDL_PRIs64 "ld"
#else
#define SDL_PRIs64 "lld"
diff --git a/src/sdl3_include_wrapper.h b/src/sdl3_include_wrapper.h
index e4fd5719..dba6266e 100644
--- a/src/sdl3_include_wrapper.h
+++ b/src/sdl3_include_wrapper.h
@@ -1208,6 +1208,8 @@
#define SDL_wcsnstr IGNORE_THIS_VERSION_OF_SDL_wcsnstr
#define SDL_wcsstr IGNORE_THIS_VERSION_OF_SDL_wcsstr
#define SDL_wcstol IGNORE_THIS_VERSION_OF_SDL_wcstol
+#define SDL_StepBackUTF8 IGNORE_THIS_VERSION_OF_SDL_StepBackUTF8
+#define SDL_DelayPrecise IGNORE_THIS_VERSION_OF_SDL_DelayPrecise
#define SDL_FUNCTION_POINTER_IS_VOID_POINTER 1
@@ -5932,6 +5934,14 @@
#undef SDL_wcstol
#endif
+#ifdef SDL_StepBackUTF8
+#undef SDL_StepBackUTF8
+#endif
+
+#ifdef SDL_DelayPrecise
+#undef SDL_DelayPrecise
+#endif
+
#undef SDL_ThreadID /* see at top. */
/* dump the macro CreateThread versions, too. */