Little rewrite of HID input (#723)
* change hid sharedmem writing to use structures
This commit is contained in:
18
Ryujinx.HLE/Input/Touch/TouchData.cs
Normal file
18
Ryujinx.HLE/Input/Touch/TouchData.cs
Normal file
@@ -0,0 +1,18 @@
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace Ryujinx.HLE.Input
|
||||
{
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
public struct TouchData
|
||||
{
|
||||
public long SampleTimestamp;
|
||||
public int Padding;
|
||||
public int Index;
|
||||
public int X;
|
||||
public int Y;
|
||||
public int DiameterX;
|
||||
public int DiameterY;
|
||||
public int Angle;
|
||||
public int Padding2;
|
||||
}
|
||||
}
|
11
Ryujinx.HLE/Input/Touch/TouchEntry.cs
Normal file
11
Ryujinx.HLE/Input/Touch/TouchEntry.cs
Normal file
@@ -0,0 +1,11 @@
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace Ryujinx.HLE.Input
|
||||
{
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
public unsafe struct TouchEntry
|
||||
{
|
||||
public long SamplesTimestamp;
|
||||
public long TouchCount;
|
||||
}
|
||||
}
|
14
Ryujinx.HLE/Input/Touch/TouchHeader.cs
Normal file
14
Ryujinx.HLE/Input/Touch/TouchHeader.cs
Normal file
@@ -0,0 +1,14 @@
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace Ryujinx.HLE.Input
|
||||
{
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
public struct TouchHeader
|
||||
{
|
||||
public long Timestamp;
|
||||
public long EntryCount;
|
||||
public long CurrentEntryIndex;
|
||||
public long MaxEntries;
|
||||
public long SamplesTimestamp;
|
||||
}
|
||||
}
|
11
Ryujinx.HLE/Input/Touch/TouchPoint.cs
Normal file
11
Ryujinx.HLE/Input/Touch/TouchPoint.cs
Normal file
@@ -0,0 +1,11 @@
|
||||
namespace Ryujinx.HLE.Input
|
||||
{
|
||||
public struct TouchPoint
|
||||
{
|
||||
public int X;
|
||||
public int Y;
|
||||
public int DiameterX;
|
||||
public int DiameterY;
|
||||
public int Angle;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user