瀏覽代碼

dynapi: implement SDL_DYNAPI_entry even when building SDL without dynapi support

Anonymous Maarten 2 年之前
父節點
當前提交
0efa196989
共有 1 個文件被更改,包括 13 次插入0 次删除
  1. 13 0
      src/dynapi/SDL_dynapi.c

+ 13 - 0
src/dynapi/SDL_dynapi.c

@@ -523,4 +523,17 @@ static void SDL_InitDynamicAPI(void)
     #endif
     #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 */
 #endif /* SDL_DYNAMIC_API */