This issue can be fixed with a small change, here is a patch:
Code: Select all
Index: src/sdl/i_joystick.cpp
===================================================================
--- src/sdl/i_joystick.cpp (revision 3386)
+++ src/sdl/i_joystick.cpp (working copy)
@@ -118,7 +118,13 @@
for (int i = 0; i < GetNumAxes(); ++i)
{
if(Axes[i].GameAxis != JOYAXIS_None)
- axes[Axes[i].GameAxis] -= float(((double)SDL_JoystickGetAxis(Device, i)/32768.0) * Multiplier * Axes[i].Multiplier);
+ {
+ const float axisValue = SDL_JoystickGetAxis( Device, i ) / 32768.0f * Multiplier * Axes[i].Multiplier;
+ if ( fabsf( axisValue ) > Axes[i].DeadZone )
+ {
+ axes[Axes[i].GameAxis] -= axisValue;
+ }
+ }
}
}
