0
0
Fork 0
This repository has been archived on 2024-10-12. You can view files and clone it, but cannot push or open issues or pull requests.
ryujinx-final/Ryujinx.HLE/HOS/Services/Hid/Types/Npad/ControllerKeys.cs
mageven 2365ddfc36
HID SharedMem Rework (#1003)
* Delete old HLE.Input

* Add new HLE Input.

git shows Hid.cs as modified because of the same name. It is new.

* Change HID Service

* Change Ryujinx UI to reflect new Input

* Add basic ControllerApplet

* Add DebugPad

Should fix Kirby Star Allies

* Address Ac_K's comments

* Moved all of HLE.Input to Services.Hid
* Separated all structs and enums each to a file
* Removed vars
* Made some naming changes to align with switchbrew
* Added official joycon colors

As an aside, fixed a mistake in touchscreen headers and added checks to
important SharedMem structs at init time.

* Further address Ac_K's comments

* Addressed gdkchan's and some more Ac_K's comments

* Address AcK's review comments

* Address AcK's second review comments

* Replace missed Marshal.SizeOf and address gdkchan's comments
2020-04-03 11:10:02 +11:00

45 lines
No EOL
1.1 KiB
C#

using System;
namespace Ryujinx.HLE.HOS.Services.Hid
{
[Flags]
public enum ControllerKeys : long
{
A = 1 << 0,
B = 1 << 1,
X = 1 << 2,
Y = 1 << 3,
LStick = 1 << 4,
RStick = 1 << 5,
L = 1 << 6,
R = 1 << 7,
Zl = 1 << 8,
Zr = 1 << 9,
Plus = 1 << 10,
Minus = 1 << 11,
DpadLeft = 1 << 12,
DpadUp = 1 << 13,
DpadRight = 1 << 14,
DpadDown = 1 << 15,
LStickLeft = 1 << 16,
LStickUp = 1 << 17,
LStickRight = 1 << 18,
LStickDown = 1 << 19,
RStickLeft = 1 << 20,
RStickUp = 1 << 21,
RStickRight = 1 << 22,
RStickDown = 1 << 23,
SlLeft = 1 << 24,
SrLeft = 1 << 25,
SlRight = 1 << 26,
SrRight = 1 << 27,
// Generic Catch-all
Up = DpadUp | LStickUp | RStickUp,
Down = DpadDown | LStickDown | RStickDown,
Left = DpadLeft | LStickLeft | RStickLeft,
Right = DpadRight | LStickRight | RStickRight,
Sl = SlLeft | SlRight,
Sr = SrLeft | SrRight
}
}