Fixed bug 3577 - Can't set minimal size (message box appears instead) if maximal size wasn't declared (i.e. unlimited)

This commit is contained in:
Sam Lantinga 2017-02-02 00:41:58 -08:00
parent 3f83fce7c1
commit da30992d47
1 changed files with 2 additions and 1 deletions

View File

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