shithub: npe

Download patch

ref: 086f757bc0f6c51c01e6300ce0370d774e6f9864
parent: f064e835258eccea9b509d3888b1dd72fb1e1961
author: qwx <qwx@sciops.net>
date: Mon Mar 2 19:16:39 EST 2026

sdl2: fix data field name and add SDL_FlushEvents stub

--- a/include/npe/SDL2/SDL_events.h
+++ b/include/npe/SDL2/SDL_events.h
@@ -68,7 +68,7 @@
 	Uint32	windowID;
 	Uint8	event;
 	Sint32	data1;
-	Sint32	data;
+	Sint32	data2;
 };
 
 struct SDL_Keysym {
@@ -149,6 +149,7 @@
 int SDL_PeepEvents(SDL_Event *events, int numevents, SDL_eventaction action, Uint32 minType, Uint32 maxType);
 Uint32 SDL_GetWindowID(SDL_Window *window);
 void SDL_PumpEvents(void);
+void SDL_FlushEvents(int from, int to);
 void SDL_SetEventFilter(SDL_EventFilter filter, void *userdata);
 SDL_Scancode SDL_GetScancodeFromKey(SDL_Keycode key);
 Uint8* SDL_GetKeyboardState(int *numkeys);
--- a/libnpe_sdl2/events.c
+++ b/libnpe_sdl2/events.c
@@ -120,6 +120,12 @@
 	/* FIXME does it matter? */
 }
 
+void
+SDL_FlushEvents(int, int)
+{
+	/* FIXME does it matter? */
+}
+
 #define ISTEXT(r) ((r) >= 0x20 && ((r) < KF || (r) >= KF+0x1000))
 
 int
--