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