mirror of
https://git.naxdy.org/Mirror/Ryujinx.git
synced 2024-11-16 01:55:27 +00:00
24 lines
725 B
C#
24 lines
725 B
C#
|
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;
|
||
|
}
|
||
|
}
|
||
|
}
|