Skip to content
Snippets Groups Projects
Commit 21bf5cc1 authored by Eric Wait's avatar Eric Wait
Browse files

Fixed resize to not always restart the renderer

parent 63680eb2
No related branches found
No related tags found
No related merge requests found
...@@ -44,6 +44,7 @@ LRESULT CALLBACK wndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) ...@@ -44,6 +44,7 @@ LRESULT CALLBACK wndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
static int previousMouseY = 0; static int previousMouseY = 0;
static DirectX::XMMATRIX previousWorldRotation; static DirectX::XMMATRIX previousWorldRotation;
static float previousPeel; static float previousPeel;
static bool minimized = false;
int label; int label;
Vec<float> pnt; Vec<float> pnt;
...@@ -61,9 +62,14 @@ LRESULT CALLBACK wndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) ...@@ -61,9 +62,14 @@ LRESULT CALLBACK wndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
if (wParam == SIZE_MINIMIZED) if (wParam == SIZE_MINIMIZED)
{ {
gRendererOn = false; gRendererOn = false;
minimized = true;
break; break;
}else if (wParam == SIZE_MAXIMIZED || wParam == SIZE_RESTORED) }
else if (wParam == SIZE_MAXIMIZED || (wParam == SIZE_RESTORED && minimized))
{
gRendererOn = true; gRendererOn = true;
minimized = false;
}
gWindowWidth = LOWORD( lParam ); gWindowWidth = LOWORD( lParam );
gWindowHeight = HIWORD( lParam ); gWindowHeight = HIWORD( lParam );
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment