Updated window resize handling on (Fixes #171)
This commit is contained in:
parent
85945cfb1a
commit
422ac626e5
2 changed files with 8 additions and 7 deletions
|
|
@ -1091,19 +1091,19 @@ void VulkanExampleBase::handleMessages(HWND hWnd, UINT uMsg, WPARAM wParam, LPAR
|
|||
case WM_SIZE:
|
||||
if ((prepared) && (wParam != SIZE_MINIMIZED))
|
||||
{
|
||||
destWidth = LOWORD(lParam);
|
||||
destHeight = HIWORD(lParam);
|
||||
if ((wParam == SIZE_MAXIMIZED) || (wParam == SIZE_MINIMIZED))
|
||||
if ((resizing) || ((wParam == SIZE_MAXIMIZED) || (wParam == SIZE_RESTORED)))
|
||||
{
|
||||
destWidth = LOWORD(lParam);
|
||||
destHeight = HIWORD(lParam);
|
||||
windowResize();
|
||||
}
|
||||
}
|
||||
break;
|
||||
case WM_ENTERSIZEMOVE:
|
||||
resizing = true;
|
||||
break;
|
||||
case WM_EXITSIZEMOVE:
|
||||
if ((prepared) && ((destWidth != width) || (destHeight != height)))
|
||||
{
|
||||
windowResize();
|
||||
}
|
||||
resizing = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -68,6 +68,7 @@ private:
|
|||
// Destination dimensions for resizing the window
|
||||
uint32_t destWidth;
|
||||
uint32_t destHeight;
|
||||
bool resizing = false;
|
||||
// Called if the window is resized and some resources have to be recreatesd
|
||||
void windowResize();
|
||||
protected:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue