Merge pull request #1388 from Areloch/SDL_Scroll_Speed_Fix

SDL mouse wheel speed fix.
This commit is contained in:
Areloch 2015-08-10 08:44:15 -05:00
commit 9782490894
3 changed files with 4 additions and 1 deletions

View file

@ -434,7 +434,8 @@ void PlatformWindowSDL::_triggerMouseLocationNotify(const SDL_Event& evt)
void PlatformWindowSDL::_triggerMouseWheelNotify(const SDL_Event& evt) void PlatformWindowSDL::_triggerMouseWheelNotify(const SDL_Event& evt)
{ {
wheelEvent.trigger(getWindowId(), 0, evt.wheel.x, evt.wheel.y); 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) void PlatformWindowSDL::_triggerMouseButtonNotify(const SDL_Event& event)

View file

@ -41,6 +41,7 @@ $pref::Input::KeyboardEnabled = 1;
$pref::Input::MouseEnabled = 1; $pref::Input::MouseEnabled = 1;
$pref::Input::JoystickEnabled = 0; $pref::Input::JoystickEnabled = 0;
$pref::Input::KeyboardTurnSpeed = 0.1; $pref::Input::KeyboardTurnSpeed = 0.1;
$pref::Input::MouseWheelSpeed = 120;
$sceneLighting::cacheSize = 20000; $sceneLighting::cacheSize = 20000;
$sceneLighting::purgeMethod = "lastCreated"; $sceneLighting::purgeMethod = "lastCreated";

View file

@ -41,6 +41,7 @@ $pref::Input::KeyboardEnabled = 1;
$pref::Input::MouseEnabled = 1; $pref::Input::MouseEnabled = 1;
$pref::Input::JoystickEnabled = 0; $pref::Input::JoystickEnabled = 0;
$pref::Input::KeyboardTurnSpeed = 0.1; $pref::Input::KeyboardTurnSpeed = 0.1;
$pref::Input::MouseWheelSpeed = 120;
$sceneLighting::cacheSize = 20000; $sceneLighting::cacheSize = 20000;
$sceneLighting::purgeMethod = "lastCreated"; $sceneLighting::purgeMethod = "lastCreated";