mirror of
https://github.com/Ryujinx/Opentk.git
synced 2025-02-25 17:26:58 +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
|
// Todo: if SDL2 GameController config is ever updated to
|
||||||
// distinguish between negative/positive axes, then update
|
// distinguish between negative/positive axes, then update
|
||||||
// the following line to support both.
|
// 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;
|
break;
|
||||||
|
|
||||||
case ConfigurationType.Button:
|
case ConfigurationType.Button:
|
||||||
|
@ -150,7 +155,12 @@ namespace OpenTK.Platform
|
||||||
// Todo: if SDL2 GameController config is ever updated to
|
// Todo: if SDL2 GameController config is ever updated to
|
||||||
// distinguish between negative/positive axes, then update
|
// distinguish between negative/positive axes, then update
|
||||||
// the following line to support both.
|
// 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;
|
break;
|
||||||
|
|
||||||
case ConfigurationType.Button:
|
case ConfigurationType.Button:
|
||||||
|
|
Loading…
Reference in a new issue