shithub: npe

Download patch

ref: 0b05fd337e6dc99755c4d8ff860f6848c3fdab1a
parent: aa5a3c93fd362849de33c1802a53c333e81a5acb
author: Sigrid Solveig Haflínudóttir <ftrvxmtrx@gmail.com>
date: Wed Mar 17 03:34:19 EDT 2021

sdl2: SDL_CreateSystemCursor nop stub

--- a/include/npe/SDL2/SDL.h
+++ b/include/npe/SDL2/SDL.h
@@ -28,6 +28,7 @@
 typedef struct SDL_Point SDL_Point;
 typedef int SDL_RendererFlip;
 typedef struct SDL_DisplayMode SDL_DisplayMode;
+typedef int SDL_SystemCursor;
 
 #pragma incomplete SDL_Cursor
 #pragma incomplete SDL_PixelFormat
@@ -164,6 +165,17 @@
 	SDL_RENDERER_PRESENTVSYNC = 0,
 
 	SDL_TEXTINPUTEVENT_TEXT_SIZE = UTFmax,
+
+	/* FIXME steal from rio and add missing? */
+	SDL_SYSTEM_CURSOR_ARROW = 0,
+	SDL_SYSTEM_CURSOR_IBEAM,
+	SDL_SYSTEM_CURSOR_WAIT,
+	SDL_SYSTEM_CURSOR_CROSSHAIR,
+	SDL_SYSTEM_CURSOR_WAITARROW,
+	SDL_SYSTEM_CURSOR_SIZENWSE,
+	SDL_SYSTEM_CURSOR_SIZENESW,
+	SDL_SYSTEM_CURSOR_SIZEWE,
+	SDL_SYSTEM_CURSOR_SIZENS,
 };
 
 enum {
--- a/libnpe_sdl2/sdl2.c
+++ b/libnpe_sdl2/sdl2.c
@@ -694,6 +694,15 @@
 	return nil;
 }
 
+SDL_Cursor *
+SDL_CreateSystemCursor(SDL_SystemCursor id)
+{
+	/* FIXME */
+	USED(id);
+
+	return nil;
+}
+
 void
 SDL_SetCursor(SDL_Cursor *c)
 {