mirror of https://github.com/mpv-player/mpv
win32: don't resize when window is minimized
At least the opengl-hq VO allocates additional resources when downscaling a lot, which is just a waste. Also see #1547 (although I doubt that this is the cause; if it is, a real fix will be required).
This commit is contained in:
parent
32e84b7c91
commit
ef23df3c84
|
@ -595,11 +595,12 @@ static LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam,
|
|||
}
|
||||
case WM_SIZE: {
|
||||
RECT r;
|
||||
GetClientRect(w32->window, &r);
|
||||
w32->dw = r.right;
|
||||
w32->dh = r.bottom;
|
||||
signal_events(w32, VO_EVENT_RESIZE);
|
||||
MP_VERBOSE(w32, "resize window: %d:%d\n", w32->dw, w32->dh);
|
||||
if (GetClientRect(w32->window, &r) && r.right > 0 && r.bottom > 0) {
|
||||
w32->dw = r.right;
|
||||
w32->dh = r.bottom;
|
||||
signal_events(w32, VO_EVENT_RESIZE);
|
||||
MP_VERBOSE(w32, "resize window: %d:%d\n", w32->dw, w32->dh);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case WM_SIZING:
|
||||
|
|
Loading…
Reference in New Issue