Added acanline rendering. Fixed interrupts. Added XInput support
This commit is contained in:
27
Desktop/Controller.cs
Normal file
27
Desktop/Controller.cs
Normal file
@@ -0,0 +1,27 @@
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
public static class XInput
|
||||
{
|
||||
// Reach into the Windows OS API
|
||||
[DllImport("xinput1_4.dll")]
|
||||
public static extern int XInputGetState(int dwUserIndex, out XINPUT_STATE pState);
|
||||
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
public struct XINPUT_STATE
|
||||
{
|
||||
public uint dwPacketNumber;
|
||||
public XINPUT_GAMEPAD Gamepad;
|
||||
}
|
||||
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
public struct XINPUT_GAMEPAD
|
||||
{
|
||||
public ushort wButtons;
|
||||
public byte bLeftTrigger;
|
||||
public byte bRightTrigger;
|
||||
public short sThumbLX;
|
||||
public short sThumbLY;
|
||||
public short sThumbRX;
|
||||
public short sThumbRY;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user