diff options
| author | emmauss <emmausssss@gmail.com> | 2019-07-22 20:15:46 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-07-22 20:15:46 +0300 |
| commit | d254548548398977a45dbfc03f2cc091c5a74f03 (patch) | |
| tree | e153a29676f6f83d44b25cc42ecd1efc8cc701e6 /Ryujinx.HLE/Input/Keyboard | |
| parent | 1f3a34dd7a5977fc340de310b2109493e5e6973f (diff) | |
Little rewrite of HID input (#723)
* change hid sharedmem writing to use structures
Diffstat (limited to 'Ryujinx.HLE/Input/Keyboard')
| -rw-r--r-- | Ryujinx.HLE/Input/Keyboard/Keyboard.cs | 8 | ||||
| -rw-r--r-- | Ryujinx.HLE/Input/Keyboard/KeyboardEntry.cs | 15 | ||||
| -rw-r--r-- | Ryujinx.HLE/Input/Keyboard/KeyboardHeader.cs | 13 |
3 files changed, 36 insertions, 0 deletions
diff --git a/Ryujinx.HLE/Input/Keyboard/Keyboard.cs b/Ryujinx.HLE/Input/Keyboard/Keyboard.cs new file mode 100644 index 00000000..7220e518 --- /dev/null +++ b/Ryujinx.HLE/Input/Keyboard/Keyboard.cs @@ -0,0 +1,8 @@ +namespace Ryujinx.HLE.Input +{ + public struct Keyboard + { + public int Modifier; + public int[] Keys; + } +}
\ No newline at end of file diff --git a/Ryujinx.HLE/Input/Keyboard/KeyboardEntry.cs b/Ryujinx.HLE/Input/Keyboard/KeyboardEntry.cs new file mode 100644 index 00000000..be7d9399 --- /dev/null +++ b/Ryujinx.HLE/Input/Keyboard/KeyboardEntry.cs @@ -0,0 +1,15 @@ +using System.Runtime.InteropServices; + +namespace Ryujinx.HLE.Input +{ + [StructLayout(LayoutKind.Sequential)] + public struct KeyboardEntry + { + public long SamplesTimestamp; + public long SamplesTimestamp2; + public long Modifier; + + [MarshalAs(UnmanagedType.ByValArray , SizeConst = 0x8)] + public int[] Keys; + } +} diff --git a/Ryujinx.HLE/Input/Keyboard/KeyboardHeader.cs b/Ryujinx.HLE/Input/Keyboard/KeyboardHeader.cs new file mode 100644 index 00000000..882ccbab --- /dev/null +++ b/Ryujinx.HLE/Input/Keyboard/KeyboardHeader.cs @@ -0,0 +1,13 @@ +using System.Runtime.InteropServices; + +namespace Ryujinx.HLE.Input +{ + [StructLayout(LayoutKind.Sequential)] + public struct KeyboardHeader + { + public long Timestamp; + public long EntryCount; + public long CurrentEntryIndex; + public long MaxEntries; + } +} |
