aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Core/Hid/HidMouse.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Ryujinx.Core/Hid/HidMouse.cs')
-rw-r--r--Ryujinx.Core/Hid/HidMouse.cs37
1 files changed, 37 insertions, 0 deletions
diff --git a/Ryujinx.Core/Hid/HidMouse.cs b/Ryujinx.Core/Hid/HidMouse.cs
new file mode 100644
index 00000000..9a019dd5
--- /dev/null
+++ b/Ryujinx.Core/Hid/HidMouse.cs
@@ -0,0 +1,37 @@
+using System.Runtime.InteropServices;
+
+namespace Ryujinx.Core
+{
+ [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;
+ }
+}