sdl2-compat: Updated for latest SDL3 changes (4207c)

From 4207c04effc5ab5b524ca5c234101b91fe63e831 Mon Sep 17 00:00:00 2001
From: Sam Lantinga <[EMAIL REDACTED]>
Date: Tue, 14 Nov 2023 06:17:52 -0800
Subject: [PATCH] Updated for latest SDL3 changes

---
 src/sdl2_compat.c          |  4 ++--
 src/sdl3_include_wrapper.h | 11 +++--------
 src/sdl3_syms.h            |  2 +-
 3 files changed, 6 insertions(+), 11 deletions(-)

diff --git a/src/sdl2_compat.c b/src/sdl2_compat.c
index 0c5c924..d65f55a 100644
--- a/src/sdl2_compat.c
+++ b/src/sdl2_compat.c
@@ -5554,8 +5554,8 @@ SDL_CreateWindowFrom(const void *data)
         SDL3_SetBooleanProperty(props, "vulkan", SDL_TRUE);
     }
 
-    SDL3_SetProperty(props, "data", (void *)data);
-    window = SDL3_CreateWindowFrom(props);
+    SDL3_SetProperty(props, "sdl2-compat.external_window", (void *)data);
+    window = SDL3_CreateWindowWithProperties(props);
     SDL3_DestroyProperties(props);
     return window;
 }
diff --git a/src/sdl3_include_wrapper.h b/src/sdl3_include_wrapper.h
index ef7ddb9..37dd007 100644
--- a/src/sdl3_include_wrapper.h
+++ b/src/sdl3_include_wrapper.h
@@ -95,8 +95,7 @@
 #define SDL_CreateThreadWithStackSize IGNORE_THIS_VERSION_OF_SDL_CreateThreadWithStackSize
 #define SDL_CreateWindow IGNORE_THIS_VERSION_OF_SDL_CreateWindow
 #define SDL_CreateWindowAndRenderer IGNORE_THIS_VERSION_OF_SDL_CreateWindowAndRenderer
-#define SDL_CreateWindowFrom IGNORE_THIS_VERSION_OF_SDL_CreateWindowFrom
-#define SDL_CreateWindowWithPosition IGNORE_THIS_VERSION_OF_SDL_CreateWindowWithPosition
+#define SDL_CreateWindowWithProperties IGNORE_THIS_VERSION_OF_SDL_CreateWindowWithProperties
 #define SDL_CursorVisible IGNORE_THIS_VERSION_OF_SDL_CursorVisible
 #define SDL_DXGIGetOutputInfo IGNORE_THIS_VERSION_OF_SDL_DXGIGetOutputInfo
 #define SDL_DelEventWatch IGNORE_THIS_VERSION_OF_SDL_DelEventWatch
@@ -1287,12 +1286,8 @@
 #undef SDL_CreateWindowAndRenderer
 #endif
 
-#ifdef SDL_CreateWindowFrom
-#undef SDL_CreateWindowFrom
-#endif
-
-#ifdef SDL_CreateWindowWithPosition
-#undef SDL_CreateWindowWithPosition
+#ifdef SDL_CreateWindowWithProperties
+#undef SDL_CreateWindowWithProperties
 #endif
 
 #ifdef SDL_CursorVisible
diff --git a/src/sdl3_syms.h b/src/sdl3_syms.h
index 50e20f2..cda119f 100644
--- a/src/sdl3_syms.h
+++ b/src/sdl3_syms.h
@@ -450,7 +450,6 @@ SDL3_SYM(int,SetWindowFullscreenMode,(SDL_Window *a, const SDL_DisplayMode *b),(
 SDL3_SYM_PASSTHROUGH(Uint32,GetWindowPixelFormat,(SDL_Window *a),(a),return)
 SDL3_SYM(SDL_Window*,CreateWindow,(const char *a, int b, int c, Uint32 d),(a,b,c,d),return)
 SDL3_SYM(SDL_Window*,CreatePopupWindow,(SDL_Window *a, int b, int c, int d, int e, Uint32 f),(a,b,c,d,e,f),return)
-SDL3_SYM(SDL_Window*,CreateWindowFrom,(SDL_PropertiesID a),(a),return)
 SDL3_SYM_PASSTHROUGH(Uint32,GetWindowID,(SDL_Window *a),(a),return)
 SDL3_SYM_PASSTHROUGH(SDL_Window*,GetWindowFromID,(Uint32 a),(a),return)
 SDL3_SYM(Uint32,GetWindowFlags,(SDL_Window *a),(a),return)
@@ -900,6 +899,7 @@ SDL3_SYM(Sint64,GetNumberProperty,(SDL_PropertiesID a, const char *b, Sint64 c),
 SDL3_SYM(SDL_PropertiesID,CreateProperties,(void),(),return)
 SDL3_SYM(int,SetBooleanProperty,(SDL_PropertiesID a, const char *b, SDL_bool c),(a,b,c),return)
 SDL3_SYM(void,DestroyProperties,(SDL_PropertiesID a),(a),)
+SDL3_SYM(SDL_Window*,CreateWindowWithProperties,(SDL_PropertiesID a),(a),return)
 
 #undef SDL3_SYM
 #undef SDL3_SYM_PASSTHROUGH