// Set the vibration speed of a controller public static void SetVibration(int controllerNumber, ushort leftSpeed, ushort rightSpeed) { XInputVibration vibe = new XInputVibration(leftSpeed, rightSpeed); XInputMethods.ProcessResult( XInputMethods.XInputSetState(controllerNumber, ref vibe) ); }
static extern uint XInputSetState( int index, // [in] Index of the gamer associated with the device ref XInputVibration vibration// [in, out] The vibration information to send to the controller );
extern static uint XInputSetState( int index, // [in] Index of the gamer associated with the device ref XInputVibration vibration // [in, out] The vibration information to send to the controller );