[Input] GamePad and Joystick classes should be sealed

This commit is contained in:
thefiddler 2014-01-02 19:27:04 +01:00
parent b513e35ea8
commit ec43b9ff85
2 changed files with 6 additions and 2 deletions

View file

@ -32,7 +32,7 @@ namespace OpenTK.Input
/// <summary>
/// Provides access to GamePad devices.
/// </summary>
public class GamePad
public sealed class GamePad
{
internal const int MaxAxisCount = 10;
internal const int MaxDPadCount = 2;
@ -40,6 +40,8 @@ namespace OpenTK.Input
static readonly IGamePadDriver driver =
Platform.Factory.Default.CreateGamePadDriver();
private GamePad() { }
/// <summary>
/// Retrieves a <c>GamePadCapabilities</c> structure describing the
/// capabilities of a gamepad device.

View file

@ -33,11 +33,13 @@ using System.Text;
namespace OpenTK.Input
{
public class Joystick
public sealed class Joystick
{
static readonly IJoystickDriver2 implementation =
Platform.Factory.Default.CreateJoystickDriver();
private Joystick() { }
public static JoystickCapabilities GetCapabilities(int index)
{
return implementation.GetCapabilities(index);