SharedResponse.cs 995 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. using System.Runtime.InteropServices;
  2. namespace Ryujinx.Modules.Motion
  3. {
  4. [StructLayout(LayoutKind.Sequential, Pack = 1)]
  5. public struct SharedResponse
  6. {
  7. public MessageType Type;
  8. public byte Slot;
  9. public SlotState State;
  10. public DeviceModelType ModelType;
  11. public ConnectionType ConnectionType;
  12. [MarshalAs(UnmanagedType.ByValArray, SizeConst = 6)]
  13. public byte[] MacAddress;
  14. public BatteryStatus BatteryStatus;
  15. }
  16. public enum SlotState : byte
  17. {
  18. Disconnected,
  19. Reserved,
  20. Connected
  21. }
  22. public enum DeviceModelType : byte
  23. {
  24. None,
  25. PartialGyro,
  26. FullGyro
  27. }
  28. public enum ConnectionType : byte
  29. {
  30. None,
  31. USB,
  32. Bluetooth
  33. }
  34. public enum BatteryStatus : byte
  35. {
  36. NA,
  37. Dying,
  38. Low,
  39. Medium,
  40. High,
  41. Full,
  42. Charging,
  43. Charged
  44. }
  45. }