Browse Source

Platform: revert "Allow horizontal-only scrolling"

Will be replaced by proper scroll event. This reverts commit
c817f8412e.
pull/158/head
Vladimír Vondruš 10 years ago
parent
commit
3f9de4e6a8
  1. 6
      src/Magnum/Platform/Sdl2Application.cpp

6
src/Magnum/Platform/Sdl2Application.cpp

@ -384,15 +384,15 @@ void Sdl2Application::mainLoop() {
event.type == SDL_MOUSEBUTTONDOWN ? mousePressEvent(e) : mouseReleaseEvent(e); event.type == SDL_MOUSEBUTTONDOWN ? mousePressEvent(e) : mouseReleaseEvent(e);
} break; } break;
case SDL_MOUSEWHEEL: { 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} MouseEvent e(event.wheel.y > 0 ? MouseEvent::Button::WheelUp : MouseEvent::Button::WheelDown, {event.wheel.x, event.wheel.y}
#ifndef CORRADE_TARGET_EMSCRIPTEN #ifndef CORRADE_TARGET_EMSCRIPTEN
, 0 , 0
#endif #endif
); );
mousePressEvent(e); mousePressEvent(e);
break; } break;
}
case SDL_MOUSEMOTION: { case SDL_MOUSEMOTION: {
MouseMoveEvent e({event.motion.x, event.motion.y}, {event.motion.xrel, event.motion.yrel}, static_cast<MouseMoveEvent::Button>(event.motion.state)); MouseMoveEvent e({event.motion.x, event.motion.y}, {event.motion.xrel, event.motion.yrel}, static_cast<MouseMoveEvent::Button>(event.motion.state));

Loading…
Cancel
Save