aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.HLE/Input/Touch
diff options
context:
space:
mode:
authoremmauss <emmausssss@gmail.com>2019-07-22 20:15:46 +0300
committerGitHub <noreply@github.com>2019-07-22 20:15:46 +0300
commitd254548548398977a45dbfc03f2cc091c5a74f03 (patch)
treee153a29676f6f83d44b25cc42ecd1efc8cc701e6 /Ryujinx.HLE/Input/Touch
parent1f3a34dd7a5977fc340de310b2109493e5e6973f (diff)
Little rewrite of HID input (#723)
* change hid sharedmem writing to use structures
Diffstat (limited to 'Ryujinx.HLE/Input/Touch')
-rw-r--r--Ryujinx.HLE/Input/Touch/TouchData.cs18
-rw-r--r--Ryujinx.HLE/Input/Touch/TouchEntry.cs11
-rw-r--r--Ryujinx.HLE/Input/Touch/TouchHeader.cs14
-rw-r--r--Ryujinx.HLE/Input/Touch/TouchPoint.cs11
4 files changed, 54 insertions, 0 deletions
diff --git a/Ryujinx.HLE/Input/Touch/TouchData.cs b/Ryujinx.HLE/Input/Touch/TouchData.cs
new file mode 100644
index 00000000..8489ef70
--- /dev/null
+++ b/Ryujinx.HLE/Input/Touch/TouchData.cs
@@ -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;
+ }
+}
diff --git a/Ryujinx.HLE/Input/Touch/TouchEntry.cs b/Ryujinx.HLE/Input/Touch/TouchEntry.cs
new file mode 100644
index 00000000..2ef09d75
--- /dev/null
+++ b/Ryujinx.HLE/Input/Touch/TouchEntry.cs
@@ -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;
+ }
+}
diff --git a/Ryujinx.HLE/Input/Touch/TouchHeader.cs b/Ryujinx.HLE/Input/Touch/TouchHeader.cs
new file mode 100644
index 00000000..dd93137c
--- /dev/null
+++ b/Ryujinx.HLE/Input/Touch/TouchHeader.cs
@@ -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;
+ }
+}
diff --git a/Ryujinx.HLE/Input/Touch/TouchPoint.cs b/Ryujinx.HLE/Input/Touch/TouchPoint.cs
new file mode 100644
index 00000000..a9b095de
--- /dev/null
+++ b/Ryujinx.HLE/Input/Touch/TouchPoint.cs
@@ -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;
+ }
+} \ No newline at end of file