Merge pull request #483 from DavidWyand-GG/JoystickDeadZoneFix

Gamepad and joystick dead zone fix
This commit is contained in:
David Wyand 2013-09-27 09:42:11 -07:00
commit 2bb0b3bc58

View file

@ -1508,9 +1508,9 @@ bool ActionMap::processAction(const InputEventInfo* pEvent)
else else
{ {
if( value > 0 ) if( value > 0 )
value = ( value - pNode->deadZoneBegin ) * ( 1.f / ( 1.f - pNode->deadZoneBegin ) ); value = ( value - pNode->deadZoneEnd ) * ( 1.f / ( 1.f - pNode->deadZoneEnd ) );
else else
value = ( value + pNode->deadZoneBegin ) * ( 1.f / ( 1.f - pNode->deadZoneBegin ) ); value = ( value - pNode->deadZoneBegin ) * ( 1.f / ( 1.f + pNode->deadZoneBegin ) );
} }
} }