diff options
| author | gdkchan <gab.dark.100@gmail.com> | 2018-03-04 00:06:44 -0300 |
|---|---|---|
| committer | gdkchan <gab.dark.100@gmail.com> | 2018-03-04 00:06:44 -0300 |
| commit | 8dcffe6a5103920ab63e46f93029b27e311335f3 (patch) | |
| tree | fbc8b089505386651c39d63616808e9b9c7bd42b /Ryujinx.Core/Hid | |
| parent | 7d48886750dadf839eb2bb37e3a81314b5497c36 (diff) | |
Fix hid touch screen timestamp, add more log info
Diffstat (limited to 'Ryujinx.Core/Hid')
| -rw-r--r-- | Ryujinx.Core/Hid/Hid.cs | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/Ryujinx.Core/Hid/Hid.cs b/Ryujinx.Core/Hid/Hid.cs index 4dbac40c..c76782cf 100644 --- a/Ryujinx.Core/Hid/Hid.cs +++ b/Ryujinx.Core/Hid/Hid.cs @@ -164,6 +164,8 @@ namespace Ryujinx.Core.Input public void SetTouchPoints(params HidTouchPoint[] Points) { + Logging.Debug("hid touch"); + long LastEntry = ReadInt64(HidTouchScreenOffset + 0x10); long CurrEntry = (LastEntry + 1) % HidEntryCount; @@ -178,9 +180,13 @@ namespace Ryujinx.Core.Input long TouchEntryOffset = HidTouchScreenOffset + HidTouchHeaderSize; - TouchEntryOffset += CurrEntry * HidTouchEntrySize; + long LastEntryOffset = TouchEntryOffset + LastEntry * HidTouchEntrySize; + + long LastTimestamp = ReadInt64(LastEntryOffset); + + TouchEntryOffset += CurrEntry * HidTouchEntrySize; - WriteInt64(TouchEntryOffset + 0x0, Timestamp); + WriteInt64(TouchEntryOffset + 0x0, LastTimestamp + 1); WriteInt64(TouchEntryOffset + 0x8, Points.Length); TouchEntryOffset += HidTouchEntryHeaderSize; @@ -220,6 +226,8 @@ namespace Ryujinx.Core.Input if ((ulong)Position + 4 > AMemoryMgr.AddrSize) return; + Logging.Debug($"hid wr32 {Position:x8} {Value:x8}"); + *((int*)((byte*)Ns.Ram + Position)) = Value; } @@ -229,6 +237,8 @@ namespace Ryujinx.Core.Input if ((ulong)Position + 8 > AMemoryMgr.AddrSize) return; + Logging.Debug($"hid wr64 {Position:x8} {Value:x16}"); + *((long*)((byte*)Ns.Ram + Position)) = Value; } } |
