shithub: npe

Download patch

ref: 2b10549c4fcfed1d97488ba633f045ae6da393e3
parent: 63fe8a7a0105321c24a1fa79c6fef01c943a54ad
author: Sigrid Solveig Haflínudóttir <sigrid@ftrv.se>
date: Wed Mar 1 12:48:55 EST 2023

sdl2: add SDL_GetVersion

--- a/include/npe/SDL2/SDL.h
+++ b/include/npe/SDL2/SDL.h
@@ -54,6 +54,7 @@
 #include <SDL2/SDL_thread.h>
 #include <SDL2/SDL_quit.h>
 #include <SDL2/SDL_rwops.h>
+#include <SDL2/SDL_version.h>
 
 void SDL_StopTextInput(void);
 SDL_bool SDL_HasSSE(void);
--- /dev/null
+++ b/include/npe/SDL2/SDL_version.h
@@ -1,0 +1,12 @@
+#ifndef _npe_SDL_version_h_
+#define _npe_SDL_version_h_
+
+typedef struct SDL_version SDL_version;
+
+struct SDL_version {
+	u8int major, minor, patch;
+};
+
+void SDL_GetVersion(SDL_version *v);
+
+#endif
--- a/libnpe_sdl2/sdl2.c
+++ b/libnpe_sdl2/sdl2.c
@@ -1080,3 +1080,12 @@
 SDL_SetMainReady(void)
 {
 }
+
+void
+SDL_GetVersion(SDL_version *v)
+{
+	/* these are arbitrary */
+	v->major = 2;
+	v->minor = 24;
+	v->patch = 1;
+}