mirror of
https://git.743378673.xyz/MeloNX/MeloNX.git
synced 2025-08-02 23: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
595e7ee588
commit
f469b968a8
12 changed files with 758 additions and 75 deletions
37
Ryujinx/Hid/HidMouse.cs
Normal file
37
Ryujinx/Hid/HidMouse.cs
Normal file
|
@ -0,0 +1,37 @@
|
|||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace Ryujinx
|
||||
{
|
||||
[StructLayout(LayoutKind.Sequential, Size = 0x20)]
|
||||
public struct HidMouseHeader
|
||||
{
|
||||
public ulong TimestampTicks;
|
||||
public ulong NumEntries;
|
||||
public ulong LatestEntry;
|
||||
public ulong MaxEntryIndex;
|
||||
}
|
||||
|
||||
[StructLayout(LayoutKind.Sequential, Size = 0x30)]
|
||||
public struct HidMouseEntry
|
||||
{
|
||||
public ulong Timestamp;
|
||||
public ulong Timestamp_2;
|
||||
public uint X;
|
||||
public uint Y;
|
||||
public uint VelocityX;
|
||||
public uint VelocityY;
|
||||
public uint ScrollVelocityX;
|
||||
public uint ScrollVelocityY;
|
||||
public ulong Buttons;
|
||||
}
|
||||
|
||||
[StructLayout(LayoutKind.Sequential, Size = 0x400)]
|
||||
public struct HidMouse
|
||||
{
|
||||
public HidMouseHeader Header;
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 17)]
|
||||
public HidMouseEntry[] Entries;
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 0xB0)]
|
||||
public byte[] Padding;
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue