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