From 7361441c9b3927a6e5ef53790c22d67c7150e9f2 Mon Sep 17 00:00:00 2001
From: Sylvain <[EMAIL REDACTED]>
Date: Fri, 3 Feb 2023 21:17:23 +0100
Subject: [PATCH] Add define to show warning vs SDL3 headers
---
src/sdl2_compat.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/src/sdl2_compat.c b/src/sdl2_compat.c
index b1f3362..1c3a989 100644
--- a/src/sdl2_compat.c
+++ b/src/sdl2_compat.c
@@ -105,9 +105,18 @@ This breaks the build when creating SDL_ ## DisableScreenSaver
extern "C" {
#endif
+/** Enable this to have warnings about wrong prototypes of src/sdl3_sym.h
+ * It won't compile but it helps to make sure it's sync'ed with SDL3 headers.
+ */
+#if 0
+#define SDL3_SYM(rc,fn,params,args,ret) \
+ typedef rc (SDLCALL *SDL3_##fn##_t) params; \
+ static SDL3_##fn##_t SDL3_##fn = IGNORE_THIS_VERSION_OF_SDL_##fn;
+#else
#define SDL3_SYM(rc,fn,params,args,ret) \
typedef rc (SDLCALL *SDL3_##fn##_t) params; \
static SDL3_##fn##_t SDL3_##fn = NULL;
+#endif
#include "sdl3_syms.h"
/* Things that _should_ be binary compatible pass right through... */