public XInputCapabilities GetCapabilities() { XInputCapabilities capabilities = new XInputCapabilities(); XInput.XInputGetCapabilities(_playerIndex, XInputConstants.XINPUT_FLAG_GAMEPAD, ref capabilities); return(capabilities); }
public static int XInputGetCapabilities( int dwUserIndex, // [in] Index of the gamer associated with the device int dwFlags, // [in] Input flags that identify the device type ref XInputCapabilities pCapabilities // [out] Receives the capabilities ) { return IsWin8OrNewer ? XInput14.XInputGetCapabilities(dwUserIndex, dwFlags, ref pCapabilities) : XInput910.XInputGetCapabilities(dwUserIndex, dwFlags, ref pCapabilities); }
public static int XInputGetCapabilities ( int dwUserIndex, // [in] Index of the gamer associated with the device int dwFlags, // [in] Input flags that identify the device type ref XInputCapabilities pCapabilities // [out] Receives the capabilities ) { return(IsWin8OrNewer ? XInput14.XInputGetCapabilities(dwUserIndex, dwFlags, ref pCapabilities) : XInput910.XInputGetCapabilities(dwUserIndex, dwFlags, ref pCapabilities)); }
public void UpdateState() { XInputCapabilities X = new XInputCapabilities(); int result = XInput.XInputGetState(_playerIndex, ref gamepadStateCurrent); IsConnected = (result == 0); UpdateBatteryState(); if (gamepadStateCurrent.PacketNumber != gamepadStatePrev.PacketNumber) { OnStateChanged(); } gamepadStatePrev.Copy(gamepadStateCurrent); if (_stopMotorTimerActive && (DateTime.Now >= _stopMotorTime)) { XInputVibration stopStrength = new XInputVibration() { LeftMotorSpeed = 0, RightMotorSpeed = 0 }; XInput.XInputSetState(_playerIndex, ref stopStrength); } }
internal static extern int XInputGetCapabilities ( int dwUserIndex, // [in] Index of the gamer associated with the device int dwFlags, // [in] Input flags that identify the device type ref XInputCapabilities pCapabilities // [out] Receives the capabilities );
public static extern int XInputGetCapabilities( int dwUserIndex, // [in] Index of the gamer associated with the device int dwFlags, // [in] Input flags that identify the device type ref XInputCapabilities pCapabilities // [out] Receives the capabilities );
public int GetCapabilities(int dwUserIndex, int dwFlags, ref XInputCapabilities pCapabilities) { switch (dllIndex) { case 0: return XInputGetCapabilities14(dwUserIndex, dwFlags, ref pCapabilities); case 1: return XInputGetCapabilities13(dwUserIndex, dwFlags, ref pCapabilities); case 2: return XInputGetCapabilities9(dwUserIndex, dwFlags, ref pCapabilities); default: return 0; } }
private static extern int XInputGetCapabilities9(int dwUserIndex, int dwFlags, ref XInputCapabilities pCapabilities);