[Input] Added JoystickAxis/Button.Last; added JoystickAxis.Axis10.
JoystickAxis/Button.Last is used internally to allocate the correct amount of storage for joystick axes and buttons. JoystickAxis.Axis10 is required to support the maximum number of axes available on Mac OS X.
This commit is contained in:
parent
59249c2624
commit
92635b3f35
3 changed files with 9 additions and 3 deletions
|
@ -5,7 +5,7 @@
|
|||
// Author:
|
||||
// Stefanos A. <stapostol@gmail.com>
|
||||
//
|
||||
// Copyright (c) 2006-2013 Stefanos Apostolopoulos
|
||||
// Copyright (c) 2006-2014 Stefanos Apostolopoulos
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
|
@ -58,5 +58,9 @@ namespace OpenTK.Input
|
|||
Axis8,
|
||||
/// <summary>The tenth axis of the JoystickDevice.</summary>
|
||||
Axis9,
|
||||
/// <summary>The eleventh axis of the JoystickDevice.</summary>
|
||||
Axis10,
|
||||
/// <summary>The highest supported axis of the JoystickDevice.</summary>
|
||||
Last = Axis10,
|
||||
}
|
||||
}
|
||||
|
|
|
@ -70,5 +70,7 @@ namespace OpenTK.Input
|
|||
Button14,
|
||||
/// <summary>The sixteenth button of the JoystickDevice.</summary>
|
||||
Button15,
|
||||
/// <summary>The last supported button of the JoystickDevice.</summary>
|
||||
Last = Button15,
|
||||
}
|
||||
}
|
||||
|
|
|
@ -40,8 +40,8 @@ namespace OpenTK.Input
|
|||
{
|
||||
// If we ever add more values to JoystickAxis or JoystickButton
|
||||
// then we'll need to increase these limits.
|
||||
internal const int MaxAxes = 10;
|
||||
internal const int MaxButtons = 32;
|
||||
internal const int MaxAxes = (int)JoystickAxis.Last;
|
||||
internal const int MaxButtons = (int)JoystickButton.Last;
|
||||
|
||||
const float ConversionFactor = 1.0f / (short.MaxValue + 0.5f);
|
||||
|
||||
|
|
Loading…
Reference in a new issue