mirror of
https://git.743378673.xyz/MeloNX/MeloNX.git
synced 2025-07-31 09:37:11 +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
54
Ryujinx/Hid/HidTouchScreen.cs
Normal file
54
Ryujinx/Hid/HidTouchScreen.cs
Normal file
|
@ -0,0 +1,54 @@
|
|||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace Ryujinx
|
||||
{
|
||||
[StructLayout(LayoutKind.Sequential, Size = 0x28)]
|
||||
public struct HidTouchScreenHeader
|
||||
{
|
||||
public ulong TimestampTicks;
|
||||
public ulong NumEntries;
|
||||
public ulong LatestEntry;
|
||||
public ulong MaxEntryIndex;
|
||||
public ulong Timestamp;
|
||||
}
|
||||
|
||||
[StructLayout(LayoutKind.Sequential, Size = 0x10)]
|
||||
public struct HidTouchScreenEntryHeader
|
||||
{
|
||||
public ulong Timestamp;
|
||||
public ulong NumTouches;
|
||||
}
|
||||
|
||||
[StructLayout(LayoutKind.Sequential, Size = 0x28)]
|
||||
public struct HidTouchScreenEntryTouch
|
||||
{
|
||||
public ulong Timestamp;
|
||||
public uint Padding;
|
||||
public uint TouchIndex;
|
||||
public uint X;
|
||||
public uint Y;
|
||||
public uint DiameterX;
|
||||
public uint DiameterY;
|
||||
public uint Angle;
|
||||
public uint Padding_2;
|
||||
}
|
||||
|
||||
[StructLayout(LayoutKind.Sequential, Size = 0x298)]
|
||||
public struct HidTouchScreenEntry
|
||||
{
|
||||
public HidTouchScreenEntryHeader Header;
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 16)]
|
||||
public HidTouchScreenEntryTouch[] Touches;
|
||||
public ulong Unknown;
|
||||
}
|
||||
|
||||
[StructLayout(LayoutKind.Sequential, Size = 0x3000)]
|
||||
public struct HidTouchScreen
|
||||
{
|
||||
public HidTouchScreenHeader Header;
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 17)]
|
||||
public HidTouchScreenEntry[] Entries;
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 0x3C0)]
|
||||
public byte[] Padding;
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue