summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--video/out/wayland_common.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/video/out/wayland_common.c b/video/out/wayland_common.c
index 5af8abdb19..30c1d3bf8f 100644
--- a/video/out/wayland_common.c
+++ b/video/out/wayland_common.c
@@ -189,6 +189,8 @@ static void pointer_handle_axis(void *data, struct wl_pointer *wl_pointer,
uint32_t time, uint32_t axis, wl_fixed_t value)
{
struct vo_wayland_state *wl = data;
+ if (wl_fixed_to_double(value) == 0)
+ return;
double val = wl_fixed_to_double(value)/abs(wl_fixed_to_double(value));
switch (axis) {
case WL_POINTER_AXIS_VERTICAL_SCROLL: