diff options
author | Rostislav Pehlivanov <atomnuker@gmail.com> | 2016-07-31 22:41:24 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2016-08-01 00:31:34 +0200 |
commit | 08a4af5e6e0df81c69f1f00ed86c4b5c541cea99 (patch) | |
tree | 829549bfb2b1b77564ba6116e96cace0c04da3a4 /video/out/wayland_common.c | |
parent | 0432ab8f0990a4f3c3a433897e33549dd13ffbfd (diff) | |
download | mpv-08a4af5e6e0df81c69f1f00ed86c4b5c541cea99.tar.bz2 mpv-08a4af5e6e0df81c69f1f00ed86c4b5c541cea99.tar.xz |
wayland_common: provide the real scaled window resolution
It makes more sense to completely abstract this scaling inside the
backend so that internally the player only works with real actual
drawn pixels.
Diffstat (limited to 'video/out/wayland_common.c')
-rw-r--r-- | video/out/wayland_common.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/video/out/wayland_common.c b/video/out/wayland_common.c index 0b40fb89cf..dbf614e516 100644 --- a/video/out/wayland_common.c +++ b/video/out/wayland_common.c @@ -1050,9 +1050,11 @@ int vo_wayland_control(struct vo *vo, int *events, int request, void *arg) vo_wayland_ontop(vo); return VO_TRUE; case VOCTRL_GET_UNFS_WINDOW_SIZE: { - int *s = arg; - s[0] = wl->window.width; - s[1] = wl->window.height; + int *s = arg, scale = 1; + if (wl->display.current_output) + scale = wl->display.current_output->scale; + s[0] = scale*wl->window.width; + s[1] = scale*wl->window.height; return VO_TRUE; } case VOCTRL_SET_UNFS_WINDOW_SIZE: { |