sdl2-compat: updated after latest SDL3 changes (2ae52)

From 2ae52503ed811529123bbb94c77f6051de9e7a37 Mon Sep 17 00:00:00 2001
From: Ozkan Sezer <[EMAIL REDACTED]>
Date: Sat, 17 Jun 2023 20:56:40 +0300
Subject: [PATCH] updated after latest SDL3 changes

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

diff --git a/src/sdl2_compat.c b/src/sdl2_compat.c
index 58d6ddd..d5776e0 100644
--- a/src/sdl2_compat.c
+++ b/src/sdl2_compat.c
@@ -3837,7 +3837,7 @@ DECLSPEC SDL_DisplayOrientation SDLCALL
 SDL_GetDisplayOrientation(int displayIndex)
 {
     SDL_DisplayID displayID = Display_IndexToID(displayIndex);
-    return SDL3_GetDisplayOrientation(displayID);
+    return SDL3_GetCurrentDisplayOrientation(displayID);
 }
 
 DECLSPEC int SDLCALL
diff --git a/src/sdl3_include_wrapper.h b/src/sdl3_include_wrapper.h
index 056fff5..207ac77 100644
--- a/src/sdl3_include_wrapper.h
+++ b/src/sdl3_include_wrapper.h
@@ -192,7 +192,7 @@
 #define SDL_GetDisplayForPoint IGNORE_THIS_VERSION_OF_SDL_GetDisplayForPoint
 #define SDL_GetDisplayForRect IGNORE_THIS_VERSION_OF_SDL_GetDisplayForRect
 #define SDL_GetDisplayName IGNORE_THIS_VERSION_OF_SDL_GetDisplayName
-#define SDL_GetDisplayOrientation IGNORE_THIS_VERSION_OF_SDL_GetDisplayOrientation
+#define SDL_GetCurrentDisplayOrientation IGNORE_THIS_VERSION_OF_SDL_GetCurrentDisplayOrientation
 #define SDL_GetDisplayUsableBounds IGNORE_THIS_VERSION_OF_SDL_GetDisplayUsableBounds
 #define SDL_GetError IGNORE_THIS_VERSION_OF_SDL_GetError
 #define SDL_GetErrorMsg IGNORE_THIS_VERSION_OF_SDL_GetErrorMsg
@@ -892,6 +892,7 @@
 #define SDL_hid_get_report_descriptor IGNORE_THIS_VERSION_OF_SDL_hid_get_report_descriptor
 #define SDL_HasWindowSurface IGNORE_THIS_VERSION_OF_SDL_HasWindowSurface
 #define SDL_DestroyWindowSurface IGNORE_THIS_VERSION_OF_SDL_DestroyWindowSurface
+#define SDL_GetNaturalDisplayOrientation IGNORE_THIS_VERSION_OF_SDL_GetNaturalDisplayOrientation
 
 /* *** HACK HACK HACK:
  * *** Avoid including SDL_thread.h: it defines SDL_CreateThread() as a macro
@@ -1606,8 +1607,8 @@ typedef void (__cdecl *pfnSDL_CurrentEndThread) (unsigned);
 #undef SDL_GetDisplayName
 #endif
 
-#ifdef SDL_GetDisplayOrientation
-#undef SDL_GetDisplayOrientation
+#ifdef SDL_GetCurrentDisplayOrientation
+#undef SDL_GetCurrentDisplayOrientation
 #endif
 
 #ifdef SDL_GetDisplayUsableBounds
@@ -4406,6 +4407,10 @@ typedef void (__cdecl *pfnSDL_CurrentEndThread) (unsigned);
 #undef SDL_DestroyWindowSurface
 #endif
 
+#ifdef SDL_GetNaturalDisplayOrientation
+#undef SDL_GetNaturalDisplayOrientation
+#endif
+
 /* undefine these macros too: */
 /* redefine using SDL3_xxx, if needed. */
 
diff --git a/src/sdl3_syms.h b/src/sdl3_syms.h
index c332bb7..630c6bd 100644
--- a/src/sdl3_syms.h
+++ b/src/sdl3_syms.h
@@ -656,7 +656,7 @@ SDL3_SYM_RENAMED(int,SensorGetData,GetSensorData,(SDL_Sensor *a, float *b, int c
 SDL3_SYM_RENAMED(void,SensorClose,CloseSensor,(SDL_Sensor *a),(a),)
 SDL3_SYM_RENAMED(void,SensorUpdate,UpdateSensors,(void),(),)
 SDL3_SYM_PASSTHROUGH(SDL_bool,IsTablet,(void),(),return)
-SDL3_SYM(SDL_DisplayOrientation,GetDisplayOrientation,(SDL_DisplayID a),(a),return)
+SDL3_SYM(SDL_DisplayOrientation,GetCurrentDisplayOrientation,(SDL_DisplayID a),(a),return)
 SDL3_SYM_RENAMED(SDL_bool,HasColorKey,SurfaceHasColorKey,(SDL_Surface *a),(a),return)
 
 #if (defined(__WIN32__) || defined(__GDK__)) && !defined(__WINRT__)