Archived
1
0
Fork 0
forked from Mirror/Ryujinx
This repository has been archived on 2024-10-11. You can view files and clone it, but cannot push or open issues or pull requests.
jinx/Ryujinx/Hid/HidMouse.cs
Ac_K f469b968a8 HID Implementation (#20)
* Basic HID Implementation

* Basic HID Implementation in Config

* HID Corrections

* HID Corrections 2
2018-02-17 20:54:19 -03:00

37 lines
1,013 B
C#

using System.Runtime.InteropServices;
namespace Ryujinx
{
[StructLayout(LayoutKind.Sequential, Size = 0x20)]
public struct HidMouseHeader
{
public ulong TimestampTicks;
public ulong NumEntries;
public ulong LatestEntry;
public ulong MaxEntryIndex;
}
[StructLayout(LayoutKind.Sequential, Size = 0x30)]
public struct HidMouseEntry
{
public ulong Timestamp;
public ulong Timestamp_2;
public uint X;
public uint Y;
public uint VelocityX;
public uint VelocityY;
public uint ScrollVelocityX;
public uint ScrollVelocityY;
public ulong Buttons;
}
[StructLayout(LayoutKind.Sequential, Size = 0x400)]
public struct HidMouse
{
public HidMouseHeader Header;
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 17)]
public HidMouseEntry[] Entries;
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 0xB0)]
public byte[] Padding;
}
}