sdl2-compat: Updated for SDL_RenderFlush -> SDL_FlushRenderer change in SDL3.

From a63358600fa2588bab66df38571e4bbf404e57f6 Mon Sep 17 00:00:00 2001
From: "Ryan C. Gordon" <[EMAIL REDACTED]>
Date: Wed, 29 Nov 2023 14:11:10 -0500
Subject: [PATCH] Updated for SDL_RenderFlush -> SDL_FlushRenderer change in
 SDL3.

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

diff --git a/src/sdl2_compat.c b/src/sdl2_compat.c
index d9596e7..5e06426 100644
--- a/src/sdl2_compat.c
+++ b/src/sdl2_compat.c
@@ -3615,12 +3615,11 @@ static int FlushRendererIfNotBatching(SDL_Renderer *renderer)
 {
     const SDL_PropertiesID props = SDL3_GetRendererProperties(renderer);
     if (!SDL3_GetBooleanProperty(props, RENDERER_BATCHING_PROP, SDL_FALSE)) {
-        return SDL3_RenderFlush(renderer);
+        return SDL3_FlushRenderer(renderer);
     }
     return 0;
 }
 
-
 /* Second parameter changed from an index to a string in SDL3. */
 DECLSPEC SDL_Renderer *SDLCALL
 SDL_CreateRenderer(SDL_Window *window, int idx, Uint32 flags)
diff --git a/src/sdl3_include_wrapper.h b/src/sdl3_include_wrapper.h
index 0bff999..ae1b4cd 100644
--- a/src/sdl3_include_wrapper.h
+++ b/src/sdl3_include_wrapper.h
@@ -133,6 +133,7 @@
 #define SDL_FlashWindow IGNORE_THIS_VERSION_OF_SDL_FlashWindow
 #define SDL_FlushEvent IGNORE_THIS_VERSION_OF_SDL_FlushEvent
 #define SDL_FlushEvents IGNORE_THIS_VERSION_OF_SDL_FlushEvents
+#define SDL_FlushRenderer IGNORE_THIS_VERSION_OF_SDL_FlushRenderer
 #define SDL_GDKGetTaskQueue IGNORE_THIS_VERSION_OF_SDL_GDKGetTaskQueue
 #define SDL_GDKSuspendComplete IGNORE_THIS_VERSION_OF_SDL_GDKSuspendComplete
 #define SDL_GL_BindTexture IGNORE_THIS_VERSION_OF_SDL_GL_BindTexture
@@ -538,7 +539,6 @@
 #define SDL_RenderCoordinatesToWindow IGNORE_THIS_VERSION_OF_SDL_RenderCoordinatesToWindow
 #define SDL_RenderFillRect IGNORE_THIS_VERSION_OF_SDL_RenderFillRect
 #define SDL_RenderFillRects IGNORE_THIS_VERSION_OF_SDL_RenderFillRects
-#define SDL_RenderFlush IGNORE_THIS_VERSION_OF_SDL_RenderFlush
 #define SDL_RenderGeometry IGNORE_THIS_VERSION_OF_SDL_RenderGeometry
 #define SDL_RenderGeometryRaw IGNORE_THIS_VERSION_OF_SDL_RenderGeometryRaw
 #define SDL_RenderLine IGNORE_THIS_VERSION_OF_SDL_RenderLine
@@ -1436,6 +1436,10 @@
 #undef SDL_FlushEvents
 #endif
 
+#ifdef SDL_FlushRenderer
+#undef SDL_FlushRenderer
+#endif
+
 #ifdef SDL_GDKGetTaskQueue
 #undef SDL_GDKGetTaskQueue
 #endif
@@ -3056,10 +3060,6 @@
 #undef SDL_RenderFillRects
 #endif
 
-#ifdef SDL_RenderFlush
-#undef SDL_RenderFlush
-#endif
-
 #ifdef SDL_RenderGeometry
 #undef SDL_RenderGeometry
 #endif
diff --git a/src/sdl3_syms.h b/src/sdl3_syms.h
index 11d1ae2..855dcb4 100644
--- a/src/sdl3_syms.h
+++ b/src/sdl3_syms.h
@@ -614,7 +614,7 @@ SDL3_SYM_RENAMED(void,SensorUpdate,UpdateSensors,(void),(),)
 SDL3_SYM_PASSTHROUGH(SDL_bool,IsTablet,(void),(),return)
 SDL3_SYM(SDL_DisplayOrientation,GetCurrentDisplayOrientation,(SDL_DisplayID a),(a),return)
 SDL3_SYM_RENAMED(SDL_bool,HasColorKey,SurfaceHasColorKey,(SDL_Surface *a),(a),return)
-SDL3_SYM_PASSTHROUGH(int,RenderFlush,(SDL_Renderer *a),(a),return)
+SDL3_SYM_RENAMED(int,RenderFlush,FlushRenderer,(SDL_Renderer *a),(a),return)
 SDL3_SYM(int,RenderPoint,(SDL_Renderer *a, float b, float c),(a,b,c),return)
 SDL3_SYM(int,RenderPoints,(SDL_Renderer *a, const SDL_FPoint *b, int c),(a,b,c),return)
 SDL3_SYM(int,RenderLine,(SDL_Renderer *a, float b, float c, float d, float e),(a,b,c,d,e),return)