From 08a4af5e6e0df81c69f1f00ed86c4b5c541cea99 Mon Sep 17 00:00:00 2001 From: Rostislav Pehlivanov Date: Sun, 31 Jul 2016 22:41:24 +0100 Subject: 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. --- video/out/wayland_common.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'video') 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: { -- cgit v1.2.3