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. 18
      src/Magnum/Platform/Sdl2Application.cpp

18
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<MouseMoveEvent::Button>(event.motion.state));

Loading…
Cancel
Save