aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.HLE/HOS/Services/Hid/HidDevices/DebugPadDevice.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Ryujinx.HLE/HOS/Services/Hid/HidDevices/DebugPadDevice.cs')
-rw-r--r--Ryujinx.HLE/HOS/Services/Hid/HidDevices/DebugPadDevice.cs24
1 files changed, 24 insertions, 0 deletions
diff --git a/Ryujinx.HLE/HOS/Services/Hid/HidDevices/DebugPadDevice.cs b/Ryujinx.HLE/HOS/Services/Hid/HidDevices/DebugPadDevice.cs
new file mode 100644
index 00000000..77e9205f
--- /dev/null
+++ b/Ryujinx.HLE/HOS/Services/Hid/HidDevices/DebugPadDevice.cs
@@ -0,0 +1,24 @@
+namespace Ryujinx.HLE.HOS.Services.Hid
+{
+ public class DebugPadDevice : BaseDevice
+ {
+ public DebugPadDevice(Switch device, bool active) : base(device, active) { }
+
+ public void Update()
+ {
+ ref ShMemDebugPad debugPad = ref _device.Hid.SharedMemory.DebugPad;
+
+ int currentIndex = UpdateEntriesHeader(ref debugPad.Header, out int previousIndex);
+
+ if (!Active)
+ {
+ return;
+ }
+
+ ref DebugPadEntry currentEntry = ref debugPad.Entries[currentIndex];
+ DebugPadEntry previousEntry = debugPad.Entries[previousIndex];
+
+ currentEntry.SampleTimestamp = previousEntry.SampleTimestamp + 1;
+ }
+ }
+} \ No newline at end of file