HidMouse.cs 1018 B

12345678910111213141516171819202122232425262728293031323334353637
  1. using System.Runtime.InteropServices;
  2. namespace Ryujinx.Core
  3. {
  4. [StructLayout(LayoutKind.Sequential, Size = 0x20)]
  5. public struct HidMouseHeader
  6. {
  7. public ulong TimestampTicks;
  8. public ulong NumEntries;
  9. public ulong LatestEntry;
  10. public ulong MaxEntryIndex;
  11. }
  12. [StructLayout(LayoutKind.Sequential, Size = 0x30)]
  13. public struct HidMouseEntry
  14. {
  15. public ulong Timestamp;
  16. public ulong Timestamp_2;
  17. public uint X;
  18. public uint Y;
  19. public uint VelocityX;
  20. public uint VelocityY;
  21. public uint ScrollVelocityX;
  22. public uint ScrollVelocityY;
  23. public ulong Buttons;
  24. }
  25. [StructLayout(LayoutKind.Sequential, Size = 0x400)]
  26. public struct HidMouse
  27. {
  28. public HidMouseHeader Header;
  29. [MarshalAs(UnmanagedType.ByValArray, SizeConst = 17)]
  30. public HidMouseEntry[] Entries;
  31. [MarshalAs(UnmanagedType.ByValArray, SizeConst = 0xB0)]
  32. public byte[] Padding;
  33. }
  34. }