From e5b8248465a49287f90dcdeb4c34ef2b86131bb0 Mon Sep 17 00:00:00 2001 From: Nick Briggs Date: Mon, 8 Nov 2021 21:28:06 -0800 Subject: [PATCH] Width, but not height, must be multiple of 32 --- src/sdl.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/sdl.c b/src/sdl.c index a216078..447f5f1 100644 --- a/src/sdl.c +++ b/src/sdl.c @@ -555,9 +555,8 @@ void process_SDLevents() { } int init_SDL(char *windowtitle, int w, int h, int s) { sdl_pixelscale = s; - // must be multiples of 32 - w = w / 32 * 32; - h = h / 32 * 32; + // width must be multiple of 32 + w = (w + 31) / 32 * 32; sdl_displaywidth = w; sdl_displayheight = h; sdl_windowwidth = w * s;