mirror of
https://github.com/Ryujinx/Opentk.git
synced 2025-02-25 12:56:46 +00:00
[Input] Fixed button/hat->trigger mapping scale
This commit is contained in:
parent
0735700d50
commit
742149412e
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue