none
C#如何使用XInput API RRS feed

答案

  • You can look into http://sharpdx.org/

    It's a managed XInput library. Connecting to a controller is easy:

    var controller = new SharpDX.XInput.Controller(SharpDX.XInput.UserIndex.One);
    if (controller.IsConnected)
    {
        var state = controller.GetState();
        var x = state.Gamepad.LeftThumbX;
        var y = state.Gamepad.LeftThumbY;
    }

    SharpDX is available as nuget package.

    • 已标记为答案 Xeon-H 2017年8月11日 9:53
    2017年7月13日 7:54