2020-09-29 21:32:42 +00:00
|
|
|
|
using System.Runtime.InteropServices;
|
|
|
|
|
|
2021-01-08 08:14:13 +00:00
|
|
|
|
namespace Ryujinx.Modules.Motion
|
2020-09-29 21:32:42 +00:00
|
|
|
|
{
|
|
|
|
|
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
|
|
|
|
public struct SharedResponse
|
|
|
|
|
{
|
2021-01-08 08:14:13 +00:00
|
|
|
|
public MessageType Type;
|
|
|
|
|
public byte Slot;
|
|
|
|
|
public SlotState State;
|
2020-09-29 21:32:42 +00:00
|
|
|
|
public DeviceModelType ModelType;
|
2021-01-08 08:14:13 +00:00
|
|
|
|
public ConnectionType ConnectionType;
|
2020-09-29 21:32:42 +00:00
|
|
|
|
|
|
|
|
|
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 6)]
|
2021-01-08 08:14:13 +00:00
|
|
|
|
public byte[] MacAddress;
|
2020-09-29 21:32:42 +00:00
|
|
|
|
public BatteryStatus BatteryStatus;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public enum SlotState : byte
|
|
|
|
|
{
|
2021-01-08 08:14:13 +00:00
|
|
|
|
Disconnected,
|
2020-09-29 21:32:42 +00:00
|
|
|
|
Reserved,
|
|
|
|
|
Connected
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public enum DeviceModelType : byte
|
|
|
|
|
{
|
2021-01-08 08:14:13 +00:00
|
|
|
|
None,
|
2020-09-29 21:32:42 +00:00
|
|
|
|
PartialGyro,
|
|
|
|
|
FullGyro
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public enum ConnectionType : byte
|
|
|
|
|
{
|
2021-01-08 08:14:13 +00:00
|
|
|
|
None,
|
2020-09-29 21:32:42 +00:00
|
|
|
|
USB,
|
|
|
|
|
Bluetooth
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public enum BatteryStatus : byte
|
|
|
|
|
{
|
2021-01-08 08:14:13 +00:00
|
|
|
|
NA,
|
2020-09-29 21:32:42 +00:00
|
|
|
|
Dying,
|
|
|
|
|
Low,
|
|
|
|
|
Medium,
|
|
|
|
|
High,
|
|
|
|
|
Full,
|
|
|
|
|
Charging,
|
|
|
|
|
Charged
|
|
|
|
|
}
|
2021-01-08 08:14:13 +00:00
|
|
|
|
}
|