From 8dab9f6ab1388c8ec73d7b341abbe69e2164308c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Camilla=20L=C3=B6wy?= Date: Wed, 13 Dec 2017 21:55:53 +0100 Subject: [PATCH] Wayland: Clarify assertion Related to #1143. --- src/wl_init.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/wl_init.c b/src/wl_init.c index 597275c9..8a5d98a4 100644 --- a/src/wl_init.c +++ b/src/wl_init.c @@ -137,6 +137,9 @@ static void pointerHandleAxis(void* data, if (!window) return; + assert(axis == WL_POINTER_AXIS_HORIZONTAL_SCROLL || + axis == WL_POINTER_AXIS_VERTICAL_SCROLL); + /* Wayland scroll events are in pointer motion coordinate space (think * two finger scroll). The factor 10 is commonly used to convert to * "scroll step means 1.0. */ @@ -152,9 +155,6 @@ static void pointerHandleAxis(void* data, x = 0.0; y = wl_fixed_to_double(value) * scrollFactor; break; - default: - assert(GLFW_FALSE); - break; } _glfwInputScroll(window, x, y);