https://github.com/libsdl-org/sdl2-compat/commit/c368587979b4c69b79f864f3ff7a2c53a71644c9
From c368587979b4c69b79f864f3ff7a2c53a71644c9 Mon Sep 17 00:00:00 2001
From: Ozkan Sezer <[EMAIL REDACTED]>
Date: Wed, 8 Jan 2025 05:21:50 +0300
Subject: [PATCH] bump minimum required SDL3 version to 3.1.8 and sync with
latest SDL3.
---
src/sdl2_compat.c | 2 +-
src/sdl3_include_wrapper.h | 14 +++++++-------
2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/src/sdl2_compat.c b/src/sdl2_compat.c
index c4571b2..83323db 100644
--- a/src/sdl2_compat.c
+++ b/src/sdl2_compat.c
@@ -318,7 +318,7 @@ static char loaderror[256];
#endif
#ifndef SDL3_REQUIRED_VER
-#define SDL3_REQUIRED_VER SDL_VERSIONNUM(3,1,6)
+#define SDL3_REQUIRED_VER SDL_VERSIONNUM(3,1,8)
#endif
#ifndef DIRSEP
diff --git a/src/sdl3_include_wrapper.h b/src/sdl3_include_wrapper.h
index b20ffd2..4345cb3 100644
--- a/src/sdl3_include_wrapper.h
+++ b/src/sdl3_include_wrapper.h
@@ -1006,7 +1006,6 @@
#define SDL_WaitEventTimeout IGNORE_THIS_VERSION_OF_SDL_WaitEventTimeout
#define SDL_WaitForGPUFences IGNORE_THIS_VERSION_OF_SDL_WaitForGPUFences
#define SDL_WaitForGPUIdle IGNORE_THIS_VERSION_OF_SDL_WaitForGPUIdle
-#define SDL_WaitForGPUSwapchain IGNORE_THIS_VERSION_OF_SDL_WaitForGPUSwapchain
#define SDL_WaitProcess IGNORE_THIS_VERSION_OF_SDL_WaitProcess
#define SDL_WaitSemaphore IGNORE_THIS_VERSION_OF_SDL_WaitSemaphore
#define SDL_WaitSemaphoreTimeout IGNORE_THIS_VERSION_OF_SDL_WaitSemaphoreTimeout
@@ -1238,6 +1237,7 @@
#define SDL_RunOnMainThread IGNORE_THIS_VERSION_OF_SDL_RunOnMainThread
#define SDL_SetGPUAllowedFramesInFlight IGNORE_THIS_VERSION_OF_SDL_SetGPUAllowedFramesInFlight
#define SDL_RenderTextureAffine IGNORE_THIS_VERSION_OF_SDL_RenderTextureAffine
+#define SDL_WaitForGPUSwapchain IGNORE_THIS_VERSION_OF_SDL_WaitForGPUSwapchain
#define SDL_WaitAndAcquireGPUSwapchainTexture IGNORE_THIS_VERSION_OF_SDL_WaitAndAcquireGPUSwapchainTexture
#define SDL_RenderDebugTextFormat IGNORE_THIS_VERSION_OF_SDL_RenderDebugTextFormat
#define SDL_CreateTray IGNORE_THIS_VERSION_OF_SDL_CreateTray
@@ -1269,8 +1269,8 @@
#define __BUILDING_SDL2_COMPAT__ 1
#include <SDL3/SDL.h>
-#if !SDL_VERSION_ATLEAST(3,1,6)
-#error You need to compile against SDL >= 3.1.6 headers
+#if !SDL_VERSION_ATLEAST(3,1,8)
+#error You need to compile against SDL >= 3.1.8 headers
#endif
#define SDL_MAIN_HANDLED 1
@@ -5178,10 +5178,6 @@
#undef SDL_WaitForGPUIdle
#endif
-#ifdef SDL_WaitForGPUSwapchain
-#undef SDL_WaitForGPUSwapchain
-#endif
-
#ifdef SDL_WaitProcess
#undef SDL_WaitProcess
#endif
@@ -6106,6 +6102,10 @@
#undef SDL_RenderTextureAffine
#endif
+#ifdef SDL_WaitForGPUSwapchain
+#undef SDL_WaitForGPUSwapchain
+#endif
+
#ifdef SDL_WaitAndAcquireGPUSwapchainTexture
#undef SDL_WaitAndAcquireGPUSwapchainTexture
#endif