commit cf84a5d66187dc620b25de35e62a77c506c15424
parent 37f2ba6a5aa8a8c3d2fb160777dd189a60c9edc8
Author: Andrew Alderwick <andrew@alderwick.co.uk>
Date: Wed, 19 Jan 2022 18:30:32 +0000
Prevent invalid screen sizes.
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/uxnemu.c b/src/uxnemu.c
@@ -113,7 +113,7 @@ set_window_size(SDL_Window *window, int w, int h)
int
set_size(Uint16 width, Uint16 height, int is_resize)
{
- screen_resize(&uxn_screen, width, height);
+ screen_resize(&uxn_screen, clamp(width, 1, 1024), clamp(height, 1, 1024));
gRect.x = PAD;
gRect.y = PAD;
gRect.w = uxn_screen.width;