示例#1
0
 /// <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
 }
示例#2
0
 /// <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);
 }