- 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
1 changed files with 4 additions and 2 deletions

View File

@ -525,8 +525,10 @@ LRESULT CALLBACK WndProc (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
}
else
{
mmi->ptMinTrackSize.x = VID_MIN_WIDTH;
mmi->ptMinTrackSize.y = VID_MIN_HEIGHT;
RECT rect = { 0, 0, VID_MIN_WIDTH, 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;
}