mirror of
https://git.743378673.xyz/MeloNX/MeloNX.git
synced 2025-08-01 22:37:10 +02:00
HID Implementation (#20)
* Basic HID Implementation * Basic HID Implementation in Config * HID Corrections * HID Corrections 2
This commit is contained in:
parent
d965ccc4ba
commit
160ed83cda
12 changed files with 758 additions and 75 deletions
33
Ryujinx/Hid/HidKeyboard.cs
Normal file
33
Ryujinx/Hid/HidKeyboard.cs
Normal file
|
@ -0,0 +1,33 @@
|
|||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace Ryujinx
|
||||
{
|
||||
[StructLayout(LayoutKind.Sequential, Size = 0x20)]
|
||||
public struct HidKeyboardHeader
|
||||
{
|
||||
public ulong TimestampTicks;
|
||||
public ulong NumEntries;
|
||||
public ulong LatestEntry;
|
||||
public ulong MaxEntryIndex;
|
||||
}
|
||||
|
||||
[StructLayout(LayoutKind.Sequential, Size = 0x38)]
|
||||
public struct HidKeyboardEntry
|
||||
{
|
||||
public ulong Timestamp;
|
||||
public ulong Timestamp_2;
|
||||
public ulong Modifier;
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 8)]
|
||||
public uint[] Keys;
|
||||
}
|
||||
|
||||
[StructLayout(LayoutKind.Sequential, Size = 0x400)]
|
||||
public struct HidKeyboard
|
||||
{
|
||||
public HidKeyboardHeader Header;
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 17)]
|
||||
public HidKeyboardEntry[] Entries;
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 0x28)]
|
||||
public byte[] Padding;
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue