Added acanline rendering. Fixed interrupts. Added XInput support

This commit is contained in:
2026-05-12 23:13:23 +01:00
parent edb41bdb3a
commit d571fe7187
6 changed files with 222 additions and 255 deletions

27
Desktop/Controller.cs Normal file
View 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;
}
}