[Input] Fixed bitwise test for GamePadAxes

This commit is contained in:
thefiddler 2014-09-12 10:23:54 +02:00
parent 2df0496c44
commit 73f255ed14

View file

@ -110,7 +110,7 @@ namespace OpenTK.Platform
// the following line to support both.
short value = pressed ?
short.MaxValue :
map.Target.Axis == GamePadAxes.LeftTrigger || map.Target.Axis == GamePadAxes.RightTrigger ?
(map.Target.Axis & (GamePadAxes.LeftTrigger | GamePadAxes.RightTrigger)) != 0 ?
short.MinValue :
(short)0;
pad.SetAxis(map.Target.Axis, value);
@ -157,7 +157,7 @@ namespace OpenTK.Platform
// the following line to support both.
short value = pressed ?
short.MaxValue :
map.Target.Axis == GamePadAxes.LeftTrigger || map.Target.Axis == GamePadAxes.RightTrigger ?
(map.Target.Axis & (GamePadAxes.LeftTrigger | GamePadAxes.RightTrigger)) != 0 ?
short.MinValue :
(short)0;
pad.SetAxis(map.Target.Axis, value);