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));