From bf44275b1af5f8757162ebbd81bdbccdfcf61a26 Mon Sep 17 00:00:00 2001 From: George Marques Date: Sun, 26 Jun 2016 18:31:31 -0300 Subject: [PATCH] Fix visual server error when minimizing the window --- platform/windows/os_windows.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/platform/windows/os_windows.cpp b/platform/windows/os_windows.cpp index 630d5715e94..9421e0d48e3 100644 --- a/platform/windows/os_windows.cpp +++ b/platform/windows/os_windows.cpp @@ -604,8 +604,12 @@ LRESULT OS_Windows::WndProc(HWND hWnd,UINT uMsg, WPARAM wParam, LPARAM lParam) { } break; case WM_SIZE: { - video_mode.width=LOWORD(lParam); - video_mode.height=HIWORD(lParam); + int window_w = LOWORD(lParam); + int window_h = HIWORD(lParam); + if (window_w > 0 && window_h > 0) { + video_mode.width = window_w; + video_mode.height = window_h; + } //return 0; // Jump Back } break; case WM_SYSKEYDOWN: