shithub: npe

Download patch

ref: 2d138bd7fae5a7e39397093fb1a4b2f6274acc0a
parent: facb661abe23b107da939e575aa9f9fbf58ac88b
author: james palmer <james@biobuf.link>
date: Fri Jul 9 09:09:09 EDT 2021

fix uxn build
- stubbed SDL_RegisterEvents
- added SDL_PIXELFORMAT_RGB24 (not usable)
- added controller button event type

--- a/include/npe/SDL2/SDL.h
+++ b/include/npe/SDL2/SDL.h
@@ -158,6 +158,7 @@
 	SDL_FLIP_VERTICAL,
 
 	SDL_PIXELFORMAT_ARGB8888 = 0x30128888,
+	SDL_PIXELFORMAT_RGB24 = 0x17101803,
 
 	/* shit no one cares about */
 	SDL_TEXTUREACCESS_STREAMING = 0,
--- a/include/npe/SDL2/SDL_events.h
+++ b/include/npe/SDL2/SDL_events.h
@@ -41,6 +41,10 @@
 		int button;
 	}button;
 	struct {
+		int button;
+		int state;
+	}cbutton;
+	struct {
 		int x, y;
 	}motion;
 	struct {
@@ -57,5 +61,6 @@
 int SDL_EventState(Uint32, int);
 int SDL_PollEvent(SDL_Event *event);
 int SDL_PushEvent(SDL_Event *event);
+int SDL_RegisterEvents(int);
 
 #endif
--- a/libnpe_sdl2/events.c
+++ b/libnpe_sdl2/events.c
@@ -59,6 +59,13 @@
 }
 
 int
+SDL_RegisterEvents(int)
+{
+	/* FIXME this will need implementation if SDL_PushEvent is */
+	return -1;
+}
+
+int
 SDL_PushEvent(SDL_Event *event)
 {
 	/* FIXME does it matter? */