diff --git a/src/video/windows/SDL_windowsevents.c b/src/video/windows/SDL_windowsevents.c index e63d7b51c..7f0eef4cc 100644 --- a/src/video/windows/SDL_windowsevents.c +++ b/src/video/windows/SDL_windowsevents.c @@ -469,8 +469,10 @@ WIN_WindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) size so we don't need to call AdjustWindowRectEx twice */ min_w -= w; min_h -= h; - max_w -= w; - max_h -= h; + if (max_w && max_h) { + max_w -= w; + max_h -= h; + } size.top = 0; size.left = 0;