diff options
author | Uoti Urpala <uau@glyph.nonexistent.invalid> | 2009-02-25 05:03:51 +0200 |
---|---|---|
committer | Uoti Urpala <uau@glyph.nonexistent.invalid> | 2009-02-25 05:03:51 +0200 |
commit | 54bb7a2582ce084895dcd0c6511dda4baf9a6c0e (patch) | |
tree | fe7d16a2a5f8131f2cef595933dd65bbfc25bf4b /libvo/w32_common.c | |
parent | 66f6f9f0768de5b003fc1b0fa9b1ea428466308a (diff) | |
parent | d1e6b2360c90db4293f3ff40a92c8e4dfa331679 (diff) | |
download | mpv-54bb7a2582ce084895dcd0c6511dda4baf9a6c0e.tar.bz2 mpv-54bb7a2582ce084895dcd0c6511dda4baf9a6c0e.tar.xz |
Merge svn changes up to r28728
Diffstat (limited to 'libvo/w32_common.c')
-rw-r--r-- | libvo/w32_common.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/libvo/w32_common.c b/libvo/w32_common.c index 076544dbab..a23ec8ea42 100644 --- a/libvo/w32_common.c +++ b/libvo/w32_common.c @@ -112,11 +112,12 @@ static LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM l if (vo_keepaspect && !vo_fs) { WINDOWPOS *wpos = lParam; int xborder, yborder; - RECT r2; - GetClientRect(vo_window, &r); - GetWindowRect(vo_window, &r2); - xborder = (r2.right - r2.left) - (r.right - r.left); - yborder = (r2.bottom - r2.top) - (r.bottom - r.top); + r.left = r.top = 0; + r.right = wpos->cx; + r.bottom = wpos->cy; + AdjustWindowRect(&r, GetWindowLong(vo_window, GWL_STYLE), 0); + xborder = (r.right - r.left) - wpos->cx; + yborder = (r.bottom - r.top) - wpos->cy; wpos->cx -= xborder; wpos->cy -= yborder; aspect_fit(global_vo, &wpos->cx, &wpos->cy, wpos->cx, wpos->cy); wpos->cx += xborder; wpos->cy += yborder; |