From 3f9de4e6a84702125e1c72709e5677b75f42f301 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Sat, 18 Jun 2016 18:22:11 +0200 Subject: [PATCH] Platform: revert "Allow horizontal-only scrolling" Will be replaced by proper scroll event. This reverts commit c817f8412e590b1f499261b2c7c37a5434ce0f07. --- src/Magnum/Platform/Sdl2Application.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/Magnum/Platform/Sdl2Application.cpp b/src/Magnum/Platform/Sdl2Application.cpp index aaa3dfd9e..ffcefec35 100644 --- a/src/Magnum/Platform/Sdl2Application.cpp +++ b/src/Magnum/Platform/Sdl2Application.cpp @@ -384,15 +384,15 @@ void Sdl2Application::mainLoop() { event.type == SDL_MOUSEBUTTONDOWN ? mousePressEvent(e) : mouseReleaseEvent(e); } break; - case SDL_MOUSEWHEEL: { - MouseEvent e(event.wheel.y > 0 ? MouseEvent::Button::WheelUp : MouseEvent::Button::WheelDown, {event.wheel.x, event.wheel.y} - #ifndef CORRADE_TARGET_EMSCRIPTEN - , 0 - #endif - ); - mousePressEvent(e); - break; - } + case SDL_MOUSEWHEEL: + if(event.wheel.y != 0) { + MouseEvent e(event.wheel.y > 0 ? MouseEvent::Button::WheelUp : MouseEvent::Button::WheelDown, {event.wheel.x, event.wheel.y} + #ifndef CORRADE_TARGET_EMSCRIPTEN + , 0 + #endif + ); + mousePressEvent(e); + } break; case SDL_MOUSEMOTION: { MouseMoveEvent e({event.motion.x, event.motion.y}, {event.motion.xrel, event.motion.yrel}, static_cast(event.motion.state));