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