internal static extern int XInputSetState( int dwUserIndex, ref XInputVibration pVibration );
/// <summary> /// Sets the Input state. /// </summary> /// <param name="dwUserIndex">The Index.</param> /// <param name="pVibration">The Vibration.</param> /// <returns></returns> internal static int XInputSetState(int dwUserIndex, ref XInputVibration pVibration) { return NativeMethods.XInputSetState(dwUserIndex, ref pVibration); }
public static extern int XInputSetState( int dwUserIndex, // [in] Index of the gamer associated with the device ref XInputVibration pVibration // [in, out] The vibration information to send to the controller );
private static extern int XInputSetState14(int dwUserIndex, ref XInputVibration pVibration);
public static void SetState(PlayerIndex playerIndex, double leftMotor, double rightMotor) { XInputVibration vibration = new XInputVibration() { LeftMotorSpeed = (ushort)(65535d * leftMotor), RightMotorSpeed = (ushort)(65535d * rightMotor) }; Imports.XInputSetState((int)playerIndex, ref vibration); }
public bool SetVibration(int index, float left, float right) { left = MathHelper.Clamp(left, 0.0f, 1.0f); right = MathHelper.Clamp(right, 0.0f, 1.0f); XInputVibration vibration = new XInputVibration( (ushort)(left * UInt16.MaxValue), (ushort)(right * UInt16.MaxValue)); return xinput.SetState((XInputUserIndex)index, ref vibration) == XInputErrorCode.Success; }
public static extern int XInputSetState(int userIndex, ref XInputVibration vibration);
public static extern int XInputSetState ( int dwUserIndex, // [in] Index of the gamer associated with the device ref XInputVibration pVibration // [in, out] The vibration information to send to the controller );
/// <summary> /// Sets the Input state. /// </summary> /// <param name="dwUserIndex">The Index.</param> /// <param name="pVibration">The Vibration.</param> /// <returns></returns> internal static int XInputSetState(int dwUserIndex, ref XInputVibration pVibration) { return(NativeMethods.XInputSetState(dwUserIndex, ref pVibration)); }