Browse code

zoom: ignore if 0, ie if the screen is somehow TOO small to do any scaling

Sigrid Solveig Haflínudóttir authored on 02/05/2023 22:53:07
Showing 1 changed files
... ...
@@ -262,8 +262,10 @@ start(Uxn *u, char *rom, int queue)
262 262
 static void
263 263
 set_zoom(Uint8 z)
264 264
 {
265
-	zoom = z;
266
-	set_window_size(gWindow, (uxn_screen.width + PAD * 2) * zoom, (uxn_screen.height + PAD * 2) * zoom);
265
+	if (z >= 1) {
266
+		zoom = z;
267
+		set_window_size(gWindow, (uxn_screen.width + PAD * 2) * zoom, (uxn_screen.height + PAD * 2) * zoom);
268
+	}
267 269
 }
268 270
 
269 271
 static void