shithub: npe

Download patch

ref: e3faf0f0cf70454fad0eec65a4e058c4dcab26c1
parent: 36992df80a3a9a05e18b00c4570e043da4352637
author: Sigrid Solveig Haflínudóttir <sigrid@ftrv.se>
date: Mon Aug 7 21:30:20 EDT 2023

SDL_CreateWindow: fix copy-paste

--- a/libnpe_sdl2/sdl2.c
+++ b/libnpe_sdl2/sdl2.c
@@ -1138,7 +1138,7 @@
 		if(x == SDL_WINDOWPOS_CENTERED)
 			x = display->image->r.min.x + (Dx(display->image->r) - w)/2;
 		if(y == SDL_WINDOWPOS_CENTERED)
-			y = display->image->r.min.y + (Dx(display->image->r) - w)/2;
+			y = display->image->r.min.y + (Dy(display->image->r) - h)/2;
 		SDL_SetWindowPosition(&onewin, x, y);
 	}