diff options
author | wm4 <wm4@nowhere> | 2013-11-02 17:50:09 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2013-11-02 17:54:46 +0100 |
commit | 891a2a1f474add323145e6b2cd2d29181830e4a4 (patch) | |
tree | 427e6ebbcc20074948e673cefea5341e6d1466a2 /video | |
parent | 9423a7e23ebd9c1c4b5e9c2884115bbeb127e47a (diff) | |
download | mpv-891a2a1f474add323145e6b2cd2d29181830e4a4.tar.bz2 mpv-891a2a1f474add323145e6b2cd2d29181830e4a4.tar.xz |
w32: implement functionality required for window-scale
Same semantics with respect to fullscreen as x11.
Diffstat (limited to 'video')
-rw-r--r-- | video/out/w32_common.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/video/out/w32_common.c b/video/out/w32_common.c index d154dd4107..f5b2729956 100644 --- a/video/out/w32_common.c +++ b/video/out/w32_common.c @@ -733,6 +733,29 @@ int vo_w32_control(struct vo *vo, int *events, int request, void *arg) case VOCTRL_UPDATE_SCREENINFO: w32_update_xinerama_info(vo); return VO_TRUE; + case VOCTRL_GET_WINDOW_SIZE: { + int *s = arg; + if (!w32->window_bounds_initialized) + return VO_FALSE; + s[0] = w32->current_fs ? w32->prev_width : vo->dwidth; + s[1] = w32->current_fs ? w32->prev_height : vo->dheight; + return VO_TRUE; + } + case VOCTRL_SET_WINDOW_SIZE: { + int *s = arg; + if (!w32->window_bounds_initialized) + return VO_FALSE; + if (w32->current_fs) { + w32->prev_width = s[0]; + w32->prev_height = s[1]; + } else { + vo->dwidth = s[0]; + vo->dheight = s[1]; + } + reinit_window_state(vo); + *events |= VO_EVENT_RESIZE; + return VO_TRUE; + } case VOCTRL_SET_CURSOR_VISIBILITY: w32->cursor_visible = *(bool *)arg; |