/// <summary> /// Retrieves a gamepad input event. /// </summary> /// <param name="userIndex">Index of the user's controller. Can be a value in the range 0–3. </param> /// <param name="keystroke">The keystroke.</param> /// <returns>False if the controller is not connected and no new keys have been pressed, true otherwise.</returns> public static bool GetKeystroke(int userIndex, out Keystroke keystroke) { return(s_xInput.XInputGetKeystroke(userIndex, out keystroke) == 0); }
int IXInput.XInputGetKeystroke(int dwUserIndex, out Keystroke keystroke) { return(XInputGetKeystroke(dwUserIndex, 0, out keystroke)); }
private static extern int XInputGetKeystroke(int dwUserIndex, int dwReserved, out Keystroke keystroke);
int IXInput.XInputGetKeystroke(int dwUserIndex, out Keystroke keystroke) { throw new NotSupportedException("XInputGetKeystroke is not supported on XInput9.1.0"); }