浏览代码

Also apply scroll strength to horizontal scrolling.

Areloch 10 年之前
父节点
当前提交
5efc04dd47
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      Engine/source/windowManager/sdl/sdlWindow.cpp

+ 2 - 1
Engine/source/windowManager/sdl/sdlWindow.cpp

@@ -434,7 +434,8 @@ void PlatformWindowSDL::_triggerMouseLocationNotify(const SDL_Event& evt)
 
 void PlatformWindowSDL::_triggerMouseWheelNotify(const SDL_Event& evt)
 {
-   wheelEvent.trigger(getWindowId(), 0, evt.wheel.x, evt.wheel.y * Con::getIntVariable("$pref::Input::MouseWheelSpeed", 120));
+   S32 wheelDelta = Con::getIntVariable("$pref::Input::MouseWheelSpeed", 120);
+   wheelEvent.trigger(getWindowId(), 0, evt.wheel.x * wheelDelta, evt.wheel.y * wheelDelta);
 }
 
 void PlatformWindowSDL::_triggerMouseButtonNotify(const SDL_Event& event)