/// <summary> /// Retrieves the capabilities and features of a connected controller. /// </summary> /// <param name="userIndex">Index of the user's controller. Can be a value in the range 0–3.</param> /// <param name="flags">Input flags that identify the controller type. /// If this value is 0, then the capabilities of all controllers connected to the system are returned. /// Currently, only one value is supported: <see cref="GetCapabilitiesFlags.Gamepad"/> - Limit the query to devices of Xbox controller type.</param> /// <param name="capabilities">An <see cref="Capabilities"/> structure that receives the controller capabilities.</param> /// <returns>If the function succeeds, the return value is <see cref="Error.Success"/>. /// If the controller is not connected, the return value is <see cref="Error.DeviceNotConnected"/>. /// If the function fails, the return value is an error code defined in WinError.h.</returns> public static Error GetCapabilities(UserIndex userIndex, GetCapabilitiesFlags flags, out Capabilities capabilities) { return(XInputGetCapabilities(userIndex, flags, out capabilities)); }
private static extern Error XInputGetCapabilities(UserIndex userIndex, GetCapabilitiesFlags flags, out Capabilities capabilities);