From 6230e0b896f2f022a83f034e401d18c259f22012 Mon Sep 17 00:00:00 2001 From: Alexander Preisinger Date: Tue, 16 Jul 2013 17:52:57 +0200 Subject: wayland: early aspect calculation in vo_config Calculate the aspect ratio in vo_config, when we get the window size and in the inside the resize function we calculate the aspect ratio of the output in order to determine if we have to change the height or the width of the video. If the ratio of the output is bigger than the ratio of the video then we have to set the width accordingly and if the ratio is smaller we change the size. But only if no resize edges are passed, because this indicates that we want to change the windows state instead of just a simple resize and the video should not grow bigger than the requested size. --- video/out/wayland_common.h | 1 + 1 file changed, 1 insertion(+) (limited to 'video/out/wayland_common.h') diff --git a/video/out/wayland_common.h b/video/out/wayland_common.h index d55fcc0bbc..dce992beb2 100644 --- a/video/out/wayland_common.h +++ b/video/out/wayland_common.h @@ -79,6 +79,7 @@ struct vo_wayland_window { int32_t height; int32_t p_width; int32_t p_height; + float aspect; struct wl_surface *surface; struct wl_shell_surface *shell_surface; -- cgit v1.2.3