diff --git a/Source/OpenTK/Platform/MappedGamePadDriver.cs b/Source/OpenTK/Platform/MappedGamePadDriver.cs index 5d55b779..7c94d697 100644 --- a/Source/OpenTK/Platform/MappedGamePadDriver.cs +++ b/Source/OpenTK/Platform/MappedGamePadDriver.cs @@ -108,7 +108,12 @@ namespace OpenTK.Platform // Todo: if SDL2 GameController config is ever updated to // distinguish between negative/positive axes, then update // the following line to support both. - pad.SetAxis(map.Target.Axis, pressed ? short.MaxValue : (short)0); + short value = pressed ? + short.MaxValue : + map.Target.Axis == GamePadAxes.LeftTrigger || map.Target.Axis == GamePadAxes.RightTrigger ? + short.MinValue : + (short)0; + pad.SetAxis(map.Target.Axis, value); break; case ConfigurationType.Button: @@ -150,7 +155,12 @@ namespace OpenTK.Platform // Todo: if SDL2 GameController config is ever updated to // distinguish between negative/positive axes, then update // the following line to support both. - pad.SetAxis(map.Target.Axis, pressed ? short.MaxValue : (short)0); + short value = pressed ? + short.MaxValue : + map.Target.Axis == GamePadAxes.LeftTrigger || map.Target.Axis == GamePadAxes.RightTrigger ? + short.MinValue : + (short)0; + pad.SetAxis(map.Target.Axis, value); break; case ConfigurationType.Button: