0
0
Fork 0
This repository has been archived on 2024-10-12. You can view files and clone it, but cannot push or open issues or pull requests.
ryujinx-final/Ryujinx.HLE/HOS/Services/Hid/HidDevices/DebugPadDevice.cs

25 lines
805 B
C#
Raw Normal View History

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;
currentEntry.SampleTimestamp2 = previousEntry.SampleTimestamp2 + 1;
}
}
}