From bb946a5a7da3b39998656fc20cce006b10712b58 Mon Sep 17 00:00:00 2001
From: Ozkan Sezer <[EMAIL REDACTED]>
Date: Fri, 14 Nov 2025 02:28:40 +0300
Subject: [PATCH] minor sync with latest SDL2 and SDL3.
---
include/SDL2/SDL_system.h | 20 ++++++++++++++++++++
src/sdl3_include_wrapper.h | 10 ++++++++++
2 files changed, 30 insertions(+)
diff --git a/include/SDL2/SDL_system.h b/include/SDL2/SDL_system.h
index 7d11a5b..336a11b 100644
--- a/include/SDL2/SDL_system.h
+++ b/include/SDL2/SDL_system.h
@@ -572,6 +572,26 @@ extern DECLSPEC const char * SDLCALL SDL_WinRTGetFSPathUTF8(SDL_WinRT_Path pathT
*/
extern DECLSPEC SDL_WinRT_DeviceFamily SDLCALL SDL_WinRTGetDeviceFamily();
+/**
+ * Get the protocol activation URI if the app was launched via protocol
+ * activation.
+ *
+ * When a UWP/WinRT app is launched via a custom URI scheme (e.g.,
+ * myapp://action?param=value), this function retrieves the full activation
+ * URI string.
+ *
+ * The URI is only available once per activation - after the first successful
+ * call, subsequent calls will return NULL. This ensures the URI is processed
+ * only once.
+ *
+ * \returns the protocol activation URI as a UTF-8 string that must be freed
+ * with SDL_free(), or NULL if the app was not activated via protocol
+ * or the URI was already retrieved.
+ *
+ * \since This function is available since SDL 2.33.0.
+ */
+extern DECLSPEC char * SDLCALL SDL_WinRTGetProtocolActivationURI(void);
+
#endif /* __WINRT__ */
/**
diff --git a/src/sdl3_include_wrapper.h b/src/sdl3_include_wrapper.h
index b6c704b..45f96df 100644
--- a/src/sdl3_include_wrapper.h
+++ b/src/sdl3_include_wrapper.h
@@ -1301,6 +1301,8 @@
#define SDL_GetPenDeviceType IGNORE_THIS_VERSION_OF_SDL_GetPenDeviceType
#define SDL_CreateAnimatedCursor IGNORE_THIS_VERSION_OF_SDL_CreateAnimatedCursor
#define SDL_RotateSurface IGNORE_THIS_VERSION_OF_SDL_RotateSurface
+#define SDL_LoadSurface_IO IGNORE_THIS_VERSION_OF_SDL_LoadSurface_IO
+#define SDL_LoadSurface IGNORE_THIS_VERSION_OF_SDL_LoadSurface
#define SDL_FUNCTION_POINTER_IS_VOID_POINTER 1
@@ -6399,6 +6401,14 @@
#undef SDL_RotateSurface
#endif
+#ifdef SDL_LoadSurface_IO
+#undef SDL_LoadSurface_IO
+#endif
+
+#ifdef SDL_LoadSurface
+#undef SDL_LoadSurface
+#endif
+
/* see at top. */
#undef SDL_ThreadID