Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

[Input] Fixed off-by-one error in internal max axes/buttons

  • Loading branch information...
commit 41a23ca371560525492de84243603cc0fff32f3c 1 parent 0e7f237
@thefiddler thefiddler authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 Source/OpenTK/Input/JoystickState.cs
View
4 Source/OpenTK/Input/JoystickState.cs
@@ -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);
Please sign in to comment.
Something went wrong with that request. Please try again.