From 5ad406d633b0eb4ced7d6dae7894c0ad432ad3db Mon Sep 17 00:00:00 2001
From: Ozkan Sezer <[EMAIL REDACTED]>
Date: Thu, 24 Jul 2025 20:20:37 +0300
Subject: [PATCH] minor sync with latest SDL2 and SDL3.
---
include/SDL2/SDL_audio.h | 2 +-
include/SDL2/SDL_keyboard.h | 2 +-
include/SDL2/SDL_keycode.h | 6 ++++++
include/SDL2/SDL_main.h | 4 ++--
src/sdl3_include_wrapper.h | 5 +++++
5 files changed, 15 insertions(+), 4 deletions(-)
diff --git a/include/SDL2/SDL_audio.h b/include/SDL2/SDL_audio.h
index cb76e93e..3ffa8099 100644
--- a/include/SDL2/SDL_audio.h
+++ b/include/SDL2/SDL_audio.h
@@ -648,7 +648,7 @@ extern DECLSPEC int SDLCALL SDL_GetDefaultAudioInfo(char **name,
* \param obtained an SDL_AudioSpec structure filled in with the actual output
* format; see SDL_OpenAudio() for more information.
* \param allowed_changes 0, or one or more flags OR'd together.
- * \returns a valid device ID that is > 0 on success or 0 on failure; call
+ * \returns a valid device ID > 0 on success or 0 on failure; call
* SDL_GetError() for more information.
*
* For compatibility with SDL 1.2, this will never return 1, since
diff --git a/include/SDL2/SDL_keyboard.h b/include/SDL2/SDL_keyboard.h
index 62ac9f22..eb46db52 100644
--- a/include/SDL2/SDL_keyboard.h
+++ b/include/SDL2/SDL_keyboard.h
@@ -49,7 +49,7 @@ typedef struct SDL_Keysym
{
SDL_Scancode scancode; /**< SDL physical key code - see SDL_Scancode for details */
SDL_Keycode sym; /**< SDL virtual key code - see SDL_Keycode for details */
- Uint16 mod; /**< current key modifiers */
+ Uint16 mod; /**< current key modifiers - see SDL_Keymod for details */
Uint32 unused;
} SDL_Keysym;
diff --git a/include/SDL2/SDL_keycode.h b/include/SDL2/SDL_keycode.h
index eb1678e3..3be801c3 100644
--- a/include/SDL2/SDL_keycode.h
+++ b/include/SDL2/SDL_keycode.h
@@ -41,12 +41,18 @@
*
* A special exception is the number keys at the top of the keyboard which map
* to SDLK_0...SDLK_9 on AZERTY layouts.
+ *
+ * The actual values that might be set for this type are listed in the
+ * SDL_KeyCode (capital C) enumeration.
*/
typedef Sint32 SDL_Keycode;
#define SDLK_SCANCODE_MASK (1<<30)
#define SDL_SCANCODE_TO_KEYCODE(X) (X | SDLK_SCANCODE_MASK)
+/**
+ * The possible values for keycodes.
+ */
typedef enum SDL_KeyCode
{
SDLK_UNKNOWN = 0,
diff --git a/include/SDL2/SDL_main.h b/include/SDL2/SDL_main.h
index a1ef3e74..53be70e5 100644
--- a/include/SDL2/SDL_main.h
+++ b/include/SDL2/SDL_main.h
@@ -187,8 +187,8 @@ extern DECLSPEC void SDLCALL SDL_SetMainReady(void);
* \param name the window class name, in UTF-8 encoding. If NULL, SDL
* currently uses "SDL_app" but this isn't guaranteed.
* \param style the value to use in WNDCLASSEX::style. If `name` is NULL, SDL
- * currently uses `(CS_BYTEALIGNCLIENT | CS_OWNDC)` regardless of
- * what is specified here.
+ * currently uses `(CS_BYTEALIGNCLIENT \| CS_OWNDC)` regardless
+ * of what is specified here.
* \param hInst the HINSTANCE to use in WNDCLASSEX::hInstance. If zero, SDL
* will use `GetModuleHandle(NULL)` instead.
* \returns 0 on success, -1 on error. SDL_GetError() may have details.
diff --git a/src/sdl3_include_wrapper.h b/src/sdl3_include_wrapper.h
index 85d6fca7..c9e14a40 100644
--- a/src/sdl3_include_wrapper.h
+++ b/src/sdl3_include_wrapper.h
@@ -1286,6 +1286,7 @@
#define SDL_SetAudioIterationCallbacks IGNORE_THIS_VERSION_OF_SDL_SetAudioIterationCallbacks
#define SDL_GetEventDescription IGNORE_THIS_VERSION_OF_SDL_GetEventDescription
#define SDL_PutAudioStreamDataNoCopy IGNORE_THIS_VERSION_OF_SDL_PutAudioStreamDataNoCopy
+#define SDL_IsTraySupported IGNORE_THIS_VERSION_OF_SDL_IsTraySupported
#define SDL_FUNCTION_POINTER_IS_VOID_POINTER 1
@@ -6324,6 +6325,10 @@
#undef SDL_PutAudioStreamDataNoCopy
#endif
+#ifdef SDL_IsTraySupported
+#undef SDL_IsTraySupported
+#endif
+
#undef SDL_ThreadID /* see at top. */
/* dump the macro CreateThread versions, too. */