- fixed: The minimal window size was not calculated properly.

Minimum size is 640x400 client size not 640x400 window size in non-fullscreen.
This commit is contained in:
Christoph Oelckers 2019-04-22 10:20:39 +02:00
parent e0a0be4f7b
commit e6ab678515

View file

@ -525,8 +525,10 @@ LRESULT CALLBACK WndProc (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
} }
else else
{ {
mmi->ptMinTrackSize.x = VID_MIN_WIDTH; RECT rect = { 0, 0, VID_MIN_WIDTH, VID_MIN_HEIGHT };
mmi->ptMinTrackSize.y = VID_MIN_HEIGHT; AdjustWindowRectEx(&rect, GetWindowLongW(hWnd, GWL_STYLE), FALSE, GetWindowLongW(hWnd, GWL_EXSTYLE));
mmi->ptMinTrackSize.x = rect.right - rect.left;
mmi->ptMinTrackSize.y = rect.bottom - rect.top;
} }
return 0; return 0;
} }