diff options
author | wm4 <wm4@nowhere> | 2015-02-02 22:52:13 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2015-02-02 22:52:13 +0100 |
commit | dd287a3276153ec4e43567ed0eddba7d595168cf (patch) | |
tree | e1b859f2ef89e2c965630979a3b5b7ced32ea752 /video/out | |
parent | 2a9534871d51965b4b6b6fb688397096df963c89 (diff) | |
download | mpv-dd287a3276153ec4e43567ed0eddba7d595168cf.tar.bz2 mpv-dd287a3276153ec4e43567ed0eddba7d595168cf.tar.xz |
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).
Diffstat (limited to 'video/out')
-rw-r--r-- | video/out/w32_common.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/video/out/w32_common.c b/video/out/w32_common.c index f0366393ff..b788054070 100644 --- a/video/out/w32_common.c +++ b/video/out/w32_common.c @@ -597,11 +597,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: |