Fix visual server error when minimizing the window

This commit is contained in:
George Marques 2016-06-26 18:31:31 -03:00
parent 10f411b47b
commit bf44275b1a
No known key found for this signature in database
GPG Key ID: 046BD46A3201E43D
1 changed files with 6 additions and 2 deletions

View File

@ -604,8 +604,12 @@ LRESULT OS_Windows::WndProc(HWND hWnd,UINT uMsg, WPARAM wParam, LPARAM lParam) {
} break; } break;
case WM_SIZE: { case WM_SIZE: {
video_mode.width=LOWORD(lParam); int window_w = LOWORD(lParam);
video_mode.height=HIWORD(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 //return 0; // Jump Back
} break; } break;
case WM_SYSKEYDOWN: case WM_SYSKEYDOWN: