shithub: npe

Download patch

ref: 595b27669a83cdbd84bfdc13d581ae8fd8c6e0be
parent: 176ccb9606a671c69cfcf1bdfb04a90c06cf5cce
author: qwx <qwx@sciops.net>
date: Mon Mar 2 19:49:50 EST 2026

sdl2: add SDL_GL_Setattribute, SDL_RenderGetLocicalSize

--- a/libnpe_sdl2/sdl2.c
+++ b/libnpe_sdl2/sdl2.c
@@ -1047,6 +1047,11 @@
 }
 
 void
+SDL_GL_SetAttribute(int, int)
+{
+}
+
+void
 SDL_GetWindowPosition(SDL_Window *, int *x, int *y)
 {
 	*x = screen->r.min.x;
@@ -1268,6 +1273,15 @@
 {
 	/* FIXME is this correct? */
 	return SDL_WINDOW_INPUT_FOCUS;
+}
+
+void
+SDL_RenderGetLogicalSize(SDL_Renderer *r, int *w, int *h)
+{
+	if(w != nil)
+		*w = r->logiw;
+	if(h != nil)
+		*h = r->logih;
 }
 
 int
--