aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Core/Hid/HidTouchScreen.cs
diff options
context:
space:
mode:
authoremmauss <emmausssss@gmail.com>2018-02-20 22:09:23 +0200
committergdkchan <gab.dark.100@gmail.com>2018-02-20 17:09:23 -0300
commit62b827f474f0aa2152dd339fcc7cf31084e16a0b (patch)
tree0e5c55b341aee4db0ccb841a084f253ec5e05657 /Ryujinx.Core/Hid/HidTouchScreen.cs
parentcb665bb715834526d73c9469d16114b287faaecd (diff)
Split main project into core,graphics and chocolarm4 subproject (#29)
Diffstat (limited to 'Ryujinx.Core/Hid/HidTouchScreen.cs')
-rw-r--r--Ryujinx.Core/Hid/HidTouchScreen.cs54
1 files changed, 54 insertions, 0 deletions
diff --git a/Ryujinx.Core/Hid/HidTouchScreen.cs b/Ryujinx.Core/Hid/HidTouchScreen.cs
new file mode 100644
index 00000000..b755cb95
--- /dev/null
+++ b/Ryujinx.Core/Hid/HidTouchScreen.cs
@@ -0,0 +1,54 @@
+using System.Runtime.InteropServices;
+
+namespace Ryujinx.Core
+{
+ [StructLayout(LayoutKind.Sequential, Size = 0x28)]
+ public struct HidTouchScreenHeader
+ {
+ public ulong TimestampTicks;
+ public ulong NumEntries;
+ public ulong LatestEntry;
+ public ulong MaxEntryIndex;
+ public ulong Timestamp;
+ }
+
+ [StructLayout(LayoutKind.Sequential, Size = 0x10)]
+ public struct HidTouchScreenEntryHeader
+ {
+ public ulong Timestamp;
+ public ulong NumTouches;
+ }
+
+ [StructLayout(LayoutKind.Sequential, Size = 0x28)]
+ public struct HidTouchScreenEntryTouch
+ {
+ public ulong Timestamp;
+ public uint Padding;
+ public uint TouchIndex;
+ public uint X;
+ public uint Y;
+ public uint DiameterX;
+ public uint DiameterY;
+ public uint Angle;
+ public uint Padding_2;
+ }
+
+ [StructLayout(LayoutKind.Sequential, Size = 0x298)]
+ public struct HidTouchScreenEntry
+ {
+ public HidTouchScreenEntryHeader Header;
+ [MarshalAs(UnmanagedType.ByValArray, SizeConst = 16)]
+ public HidTouchScreenEntryTouch[] Touches;
+ public ulong Unknown;
+ }
+
+ [StructLayout(LayoutKind.Sequential, Size = 0x3000)]
+ public struct HidTouchScreen
+ {
+ public HidTouchScreenHeader Header;
+ [MarshalAs(UnmanagedType.ByValArray, SizeConst = 17)]
+ public HidTouchScreenEntry[] Entries;
+ [MarshalAs(UnmanagedType.ByValArray, SizeConst = 0x3C0)]
+ public byte[] Padding;
+ }
+}