mirror of
https://github.com/Ryujinx/Opentk.git
synced 2025-01-25 17:41:10 +00:00
[Input] GamePad and Joystick classes should be sealed
This commit is contained in:
parent
b513e35ea8
commit
ec43b9ff85
|
@ -32,7 +32,7 @@ namespace OpenTK.Input
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Provides access to GamePad devices.
|
/// Provides access to GamePad devices.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class GamePad
|
public sealed class GamePad
|
||||||
{
|
{
|
||||||
internal const int MaxAxisCount = 10;
|
internal const int MaxAxisCount = 10;
|
||||||
internal const int MaxDPadCount = 2;
|
internal const int MaxDPadCount = 2;
|
||||||
|
@ -40,6 +40,8 @@ namespace OpenTK.Input
|
||||||
static readonly IGamePadDriver driver =
|
static readonly IGamePadDriver driver =
|
||||||
Platform.Factory.Default.CreateGamePadDriver();
|
Platform.Factory.Default.CreateGamePadDriver();
|
||||||
|
|
||||||
|
private GamePad() { }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Retrieves a <c>GamePadCapabilities</c> structure describing the
|
/// Retrieves a <c>GamePadCapabilities</c> structure describing the
|
||||||
/// capabilities of a gamepad device.
|
/// capabilities of a gamepad device.
|
||||||
|
|
|
@ -33,11 +33,13 @@ using System.Text;
|
||||||
|
|
||||||
namespace OpenTK.Input
|
namespace OpenTK.Input
|
||||||
{
|
{
|
||||||
public class Joystick
|
public sealed class Joystick
|
||||||
{
|
{
|
||||||
static readonly IJoystickDriver2 implementation =
|
static readonly IJoystickDriver2 implementation =
|
||||||
Platform.Factory.Default.CreateJoystickDriver();
|
Platform.Factory.Default.CreateJoystickDriver();
|
||||||
|
|
||||||
|
private Joystick() { }
|
||||||
|
|
||||||
public static JoystickCapabilities GetCapabilities(int index)
|
public static JoystickCapabilities GetCapabilities(int index)
|
||||||
{
|
{
|
||||||
return implementation.GetCapabilities(index);
|
return implementation.GetCapabilities(index);
|
||||||
|
|
Loading…
Reference in a new issue