From 3b34d6b6f15c75ed44e025a3732917431f096c2b Mon Sep 17 00:00:00 2001 From: twinaphex Date: Thu, 7 Jan 2016 00:43:16 +0100 Subject: [PATCH] WM_SIZE - we need to call the context driver's d3d_resize function --- gfx/common/win32_common.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/gfx/common/win32_common.cpp b/gfx/common/win32_common.cpp index 62efe7f4a9..2b79849616 100644 --- a/gfx/common/win32_common.cpp +++ b/gfx/common/win32_common.cpp @@ -225,6 +225,16 @@ LRESULT CALLBACK WndProcD3D(HWND hwnd, UINT message, switch (message) { + case WM_SIZE: + /* Do not send resize message if we minimize. */ + g_resize_width = LOWORD(lparam); + g_resize_height = HIWORD(lparam); + g_resized = true; + *quit = true; + + if (g_resize_width && g_resize_height) + gfx_ctx_set_resize(g_resize_width, g_resize_height); + return 0; case WM_SYSCOMMAND: case WM_CHAR: case WM_KEYDOWN: @@ -234,7 +244,6 @@ LRESULT CALLBACK WndProcD3D(HWND hwnd, UINT message, case WM_CLOSE: case WM_DESTROY: case WM_QUIT: - case WM_SIZE: case WM_COMMAND: ret = WndProcCommon(&quit, hwnd, message, wparam, lparam); if (quit)