aboutsummaryrefslogtreecommitdiffhomepage
path: root/video/out/wayland_common.h
diff options
context:
space:
mode:
authorGravatar Alexander Preisinger <alexander.preisinger@gmail.com>2013-07-16 17:52:57 +0200
committerGravatar Alexander Preisinger <alexander.preisinger@gmail.com>2013-07-16 19:13:29 +0200
commit6230e0b896f2f022a83f034e401d18c259f22012 (patch)
tree9c854c88cf164f5a7168682d2629cb560cf7ba78 /video/out/wayland_common.h
parentdc142991f12c379282d6c52e6d98333765767c3c (diff)
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.
Diffstat (limited to 'video/out/wayland_common.h')
-rw-r--r--video/out/wayland_common.h1
1 files changed, 1 insertions, 0 deletions
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;