From 0efa196989b66884c2d08f9b4a4713811eec83e7 Mon Sep 17 00:00:00 2001
From: Anonymous Maarten <[EMAIL REDACTED]>
Date: Wed, 27 Sep 2023 05:14:14 +0200
Subject: [PATCH] dynapi: implement SDL_DYNAPI_entry even when building SDL
without dynapi support
---
src/dynapi/SDL_dynapi.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/src/dynapi/SDL_dynapi.c b/src/dynapi/SDL_dynapi.c
index e85437c70a7e..9ec57e41e011 100644
--- a/src/dynapi/SDL_dynapi.c
+++ b/src/dynapi/SDL_dynapi.c
@@ -523,4 +523,17 @@ static void SDL_InitDynamicAPI(void)
#endif
}
+#else /* SDL_DYNAMIC_API */
+
+#include <SDL3/SDL.h>
+
+Sint32 SDL_DYNAPI_entry(Uint32 apiver, void *table, Uint32 tablesize);
+Sint32 SDL_DYNAPI_entry(Uint32 apiver, void *table, Uint32 tablesize)
+{
+ (void)apiver;
+ (void)table;
+ (void)tablesize;
+ return -1; /* not compatible. */
+}
+
#endif /* SDL_DYNAMIC_API */