/// <summary> /// Sets the vibration. /// /// </summary> /// <param name="vibration">The vibration.</param> /// <returns/> public Result SetVibration(Vibration vibration) { #if WINDOWS Result result = ErrorCodeHelper.ToResult(XInput.XInputSetState((int)this.userIndex, vibration)); result.CheckError(); return result; #else return Result.Abord; #endif }
/// <summary> /// Sends data to a connected controller. This function is used to activate the vibration function of a controller. /// </summary> public static unsafe int XInputSetState(int dwUserIndex, Vibration vibrationRef) { return XInput.XInputSetState_(dwUserIndex, (void*)&vibrationRef); }