Prevent invalid screen sizes.

This commit is contained in:
Andrew Alderwick 2022-01-19 18:30:32 +00:00
parent 37f2ba6a5a
commit cf84a5d661
1 changed files with 1 additions and 1 deletions

View File

@ -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;