Skip to content

Commit

Permalink
Fixed bug 3577 - Can't set minimal size (message box appears instead)…
Browse files Browse the repository at this point in the history
… if maximal size wasn't declared (i.e. unlimited)
  • Loading branch information
slouken committed Feb 2, 2017
1 parent 3f83fce commit da30992
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/video/SDL_video.c
Expand Up @@ -1969,7 +1969,8 @@ SDL_SetWindowMinimumSize(SDL_Window * window, int min_w, int min_h)
return;
}

if (min_w >= window->max_w || min_h >= window->max_h) {
if ((window->max_w && min_w >= window->max_w) ||
(window->max_h && min_h >= window->max_h)) {
SDL_SetError("SDL_SetWindowMinimumSize(): Tried to set minimum size larger than maximum size");
return;
}
Expand Down

0 comments on commit da30992

Please sign in to comment.