diff options
author | wm4 <wm4@nowhere> | 2014-11-28 22:11:54 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2014-11-28 22:11:54 +0100 |
commit | 4af24daf2c4d98f775c5a40d08878d6a2e974503 (patch) | |
tree | 383b4bf60bbb75bee938f34522e247bff2616b58 /video/out | |
parent | 70630fb803fde5ddcf9f3bd33ab8d682274d1ee7 (diff) | |
download | mpv-4af24daf2c4d98f775c5a40d08878d6a2e974503.tar.bz2 mpv-4af24daf2c4d98f775c5a40d08878d6a2e974503.tar.xz |
win32: add screen offset when handling overlarge windows
MS Windows doesn't allow windows larger than the screen, so we include
a hack to make the window smaller. This hack recenters the window (what
else would it do?).
It didn't account for the virtual offset of the current screen, and it
was reported that it forces the window to the first screen.
Should fix #1292.
Diffstat (limited to 'video/out')
-rw-r--r-- | video/out/w32_common.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/video/out/w32_common.c b/video/out/w32_common.c index f2d02d2c84..9f0180b49e 100644 --- a/video/out/w32_common.c +++ b/video/out/w32_common.c @@ -904,8 +904,8 @@ static int reinit_window_state(struct vo_w32_state *w32) // Center the final window n_w = r.right - r.left; n_h = r.bottom - r.top; - r.left = screen_w / 2 - n_w / 2; - r.top = screen_h / 2 - n_h / 2; + r.left = w32->screenrc.x0 + screen_w / 2 - n_w / 2; + r.top = w32->screenrc.y0 + screen_h / 2 - n_h / 2; r.right = r.left + n_w; r.bottom = r.top + n_h; } |