Skip to content

Commit

Permalink
[Input] Fixed off-by-one error in internal max axes/buttons
Browse files Browse the repository at this point in the history
  • Loading branch information
thefiddler committed Jan 30, 2014
1 parent 0e7f237 commit 41a23ca
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Source/OpenTK/Input/JoystickState.cs
Expand Up @@ -40,8 +40,8 @@ public struct JoystickState : IEquatable<JoystickState>
{
// If we ever add more values to JoystickAxis or JoystickButton
// then we'll need to increase these limits.
internal const int MaxAxes = (int)JoystickAxis.Last;
internal const int MaxButtons = (int)JoystickButton.Last;
internal const int MaxAxes = (int)JoystickAxis.Last + 1;
internal const int MaxButtons = (int)JoystickButton.Last + 1;

const float ConversionFactor = 1.0f / (short.MaxValue + 0.5f);

Expand Down

0 comments on commit 41a23ca

Please sign in to comment.