HidTouchScreen.cs 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. using System.Runtime.InteropServices;
  2. namespace Ryujinx.Core
  3. {
  4. [StructLayout(LayoutKind.Sequential, Size = 0x28)]
  5. public struct HidTouchScreenHeader
  6. {
  7. public ulong TimestampTicks;
  8. public ulong NumEntries;
  9. public ulong LatestEntry;
  10. public ulong MaxEntryIndex;
  11. public ulong Timestamp;
  12. }
  13. [StructLayout(LayoutKind.Sequential, Size = 0x10)]
  14. public struct HidTouchScreenEntryHeader
  15. {
  16. public ulong Timestamp;
  17. public ulong NumTouches;
  18. }
  19. [StructLayout(LayoutKind.Sequential, Size = 0x28)]
  20. public struct HidTouchScreenEntryTouch
  21. {
  22. public ulong Timestamp;
  23. public uint Padding;
  24. public uint TouchIndex;
  25. public uint X;
  26. public uint Y;
  27. public uint DiameterX;
  28. public uint DiameterY;
  29. public uint Angle;
  30. public uint Padding_2;
  31. }
  32. [StructLayout(LayoutKind.Sequential, Size = 0x298)]
  33. public struct HidTouchScreenEntry
  34. {
  35. public HidTouchScreenEntryHeader Header;
  36. [MarshalAs(UnmanagedType.ByValArray, SizeConst = 16)]
  37. public HidTouchScreenEntryTouch[] Touches;
  38. public ulong Unknown;
  39. }
  40. [StructLayout(LayoutKind.Sequential, Size = 0x3000)]
  41. public struct HidTouchScreen
  42. {
  43. public HidTouchScreenHeader Header;
  44. [MarshalAs(UnmanagedType.ByValArray, SizeConst = 17)]
  45. public HidTouchScreenEntry[] Entries;
  46. [MarshalAs(UnmanagedType.ByValArray, SizeConst = 0x3C0)]
  47. public byte[] Padding;
  48. }
  49. }