diff options
Diffstat (limited to 'src/Ryujinx.HLE/HOS/Services/Hid/HidDevices/DebugPadDevice.cs')
| -rw-r--r-- | src/Ryujinx.HLE/HOS/Services/Hid/HidDevices/DebugPadDevice.cs | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/Ryujinx.HLE/HOS/Services/Hid/HidDevices/DebugPadDevice.cs b/src/Ryujinx.HLE/HOS/Services/Hid/HidDevices/DebugPadDevice.cs new file mode 100644 index 00000000..e3b95390 --- /dev/null +++ b/src/Ryujinx.HLE/HOS/Services/Hid/HidDevices/DebugPadDevice.cs @@ -0,0 +1,28 @@ +using Ryujinx.HLE.HOS.Services.Hid.Types.SharedMemory.Common; +using Ryujinx.HLE.HOS.Services.Hid.Types.SharedMemory.DebugPad; + +namespace Ryujinx.HLE.HOS.Services.Hid +{ + public class DebugPadDevice : BaseDevice + { + public DebugPadDevice(Switch device, bool active) : base(device, active) { } + + public void Update() + { + ref RingLifo<DebugPadState> lifo = ref _device.Hid.SharedMemory.DebugPad; + + ref DebugPadState previousEntry = ref lifo.GetCurrentEntryRef(); + + DebugPadState newState = new DebugPadState(); + + if (Active) + { + // TODO: This is a debug device only present in dev environment, do we want to support it? + } + + newState.SamplingNumber = previousEntry.SamplingNumber + 1; + + lifo.Write(ref newState); + } + } +}
\ No newline at end of file |
