mirror of
https://github.com/Ryujinx/Opentk.git
synced 2025-01-09 23:15:36 +00:00
[Input] Do not use a bitfield for hat position
Using a bitfield does not save storage space in this case, and also stops pattern matching from working (switch() statement in C# or match … with expressions in F#.)
This commit is contained in:
parent
a4ce2182d2
commit
0cacdf6ae4
|
@ -34,18 +34,44 @@ namespace OpenTK.Input
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Enumerates discrete positions for a joystick hat.
|
/// Enumerates discrete positions for a joystick hat.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Flags]
|
|
||||||
public enum HatPosition : byte
|
public enum HatPosition : byte
|
||||||
{
|
{
|
||||||
Centered = 0x00,
|
/// <summary>
|
||||||
Up = 0x01,
|
/// The hat is in its centered (neutral) position
|
||||||
Right = 0x02,
|
/// </summary>
|
||||||
Down = 0x03,
|
Centered = 0,
|
||||||
Left = 0x04,
|
/// <summary>
|
||||||
RightUp = Right | Up,
|
/// The hat is in its top position.
|
||||||
RightDown = Right | Down,
|
/// </summary>
|
||||||
LeftUp = Left | Up,
|
Up,
|
||||||
LeftDown = Left | Down
|
/// <summary>
|
||||||
|
/// The hat is in its top-right position.
|
||||||
|
/// </summary>
|
||||||
|
UpRight,
|
||||||
|
/// <summary>
|
||||||
|
/// The hat is in its right position.
|
||||||
|
/// </summary>
|
||||||
|
Right,
|
||||||
|
/// <summary>
|
||||||
|
/// The hat is in its bottom-right position.
|
||||||
|
/// </summary>
|
||||||
|
DownRight,
|
||||||
|
/// <summary>
|
||||||
|
/// The hat is in its bottom position.
|
||||||
|
/// </summary>
|
||||||
|
Down,
|
||||||
|
/// <summary>
|
||||||
|
/// The hat is in its bottom-left position.
|
||||||
|
/// </summary>
|
||||||
|
DownLeft,
|
||||||
|
/// <summary>
|
||||||
|
/// The hat is in its left position.
|
||||||
|
/// </summary>
|
||||||
|
Left,
|
||||||
|
/// <summary>
|
||||||
|
/// The hat is in its top-left position.
|
||||||
|
/// </summary>
|
||||||
|
UpLeft,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue