2022-11-24 14:26:29 +00:00
|
|
|
|
using Ryujinx.Common.Memory;
|
|
|
|
|
using System.Runtime.InteropServices;
|
2020-09-29 21:32:42 +00:00
|
|
|
|
|
2021-04-14 10:28:43 +00:00
|
|
|
|
namespace Ryujinx.Input.Motion.CemuHook.Protocol
|
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
|
|
|
|
|
2022-11-24 14:26:29 +00:00
|
|
|
|
public Array6<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
|
|
|
|
}
|