libsdl-org / sdl2-compat

An SDL2 compatibility layer that uses SDL3 behind the scenes.
zlib License
80 stars 19 forks source link

Update for SDL3 modal and toplevel parent changes #215

Closed Kontrabant closed 2 months ago

sezero commented 2 months ago

I think the missing part is this:

diff --git a/src/sdl3_include_wrapper.h b/src/sdl3_include_wrapper.h
index 1237c83..0dced61 100644
--- a/src/sdl3_include_wrapper.h
+++ b/src/sdl3_include_wrapper.h
@@ -886,10 +886,11 @@
 #define SDL_SetWindowKeyboardGrab IGNORE_THIS_VERSION_OF_SDL_SetWindowKeyboardGrab
 #define SDL_SetWindowMaximumSize IGNORE_THIS_VERSION_OF_SDL_SetWindowMaximumSize
 #define SDL_SetWindowMinimumSize IGNORE_THIS_VERSION_OF_SDL_SetWindowMinimumSize
-#define SDL_SetWindowModalFor IGNORE_THIS_VERSION_OF_SDL_SetWindowModalFor
+#define SDL_SetWindowModal IGNORE_THIS_VERSION_OF_SDL_SetWindowModal
 #define SDL_SetWindowMouseGrab IGNORE_THIS_VERSION_OF_SDL_SetWindowMouseGrab
 #define SDL_SetWindowMouseRect IGNORE_THIS_VERSION_OF_SDL_SetWindowMouseRect
 #define SDL_SetWindowOpacity IGNORE_THIS_VERSION_OF_SDL_SetWindowOpacity
+#define SDL_SetWindowParent IGNORE_THIS_VERSION_OF_SDL_SetWindowParent
 #define SDL_SetWindowPosition IGNORE_THIS_VERSION_OF_SDL_SetWindowPosition
 #define SDL_SetWindowRelativeMouseMode IGNORE_THIS_VERSION_OF_SDL_SetWindowRelativeMouseMode
 #define SDL_SetWindowResizable IGNORE_THIS_VERSION_OF_SDL_SetWindowResizable
@@ -4609,8 +4610,8 @@
 #undef SDL_SetWindowMinimumSize
 #endif

-#ifdef SDL_SetWindowModalFor
-#undef SDL_SetWindowModalFor
+#ifdef SDL_SetWindowModal
+#undef SDL_SetWindowModal
 #endif

 #ifdef SDL_SetWindowMouseGrab
@@ -4625,6 +4626,10 @@
 #undef SDL_SetWindowOpacity
 #endif

+#ifdef SDL_SetWindowParent
+#undef SDL_SetWindowParent
+#endif
+
 #ifdef SDL_SetWindowPosition
 #undef SDL_SetWindowPosition
 #endif
Kontrabant commented 2 months ago

Yep, overlooked the include wrapper. Thanks for the tip.