Little rewrite of HID input (#723)
* change hid sharedmem writing to use structures
This commit is contained in:
parent
1f3a34dd7a
commit
d254548548
42 changed files with 682 additions and 409 deletions
8
Ryujinx.HLE/Input/Keyboard/Keyboard.cs
Normal file
8
Ryujinx.HLE/Input/Keyboard/Keyboard.cs
Normal file
|
@ -0,0 +1,8 @@
|
|||
namespace Ryujinx.HLE.Input
|
||||
{
|
||||
public struct Keyboard
|
||||
{
|
||||
public int Modifier;
|
||||
public int[] Keys;
|
||||
}
|
||||
}
|
15
Ryujinx.HLE/Input/Keyboard/KeyboardEntry.cs
Normal file
15
Ryujinx.HLE/Input/Keyboard/KeyboardEntry.cs
Normal file
|
@ -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;
|
||||
}
|
||||
}
|
13
Ryujinx.HLE/Input/Keyboard/KeyboardHeader.cs
Normal file
13
Ryujinx.HLE/Input/Keyboard/KeyboardHeader.cs
Normal file
|
@ -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;
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue