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); event.type == SDL_MOUSEBUTTONDOWN ? mousePressEvent(e) : mouseReleaseEvent(e);
} break; } break;
case SDL_MOUSEWHEEL: { case SDL_MOUSEWHEEL:
MouseEvent e(event.wheel.y > 0 ? MouseEvent::Button::WheelUp : MouseEvent::Button::WheelDown, {event.wheel.x, event.wheel.y} if(event.wheel.y != 0) {
#ifndef CORRADE_TARGET_EMSCRIPTEN MouseEvent e(event.wheel.y > 0 ? MouseEvent::Button::WheelUp : MouseEvent::Button::WheelDown, {event.wheel.x, event.wheel.y}
, 0 #ifndef CORRADE_TARGET_EMSCRIPTEN
#endif , 0
); #endif
mousePressEvent(e); );
break; mousePressEvent(e);
} } 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