コード例 #1
0
ファイル: NativeMethods.cs プロジェクト: ThuCommix/Sharpex2D
 internal static extern int XInputSetState(
     int dwUserIndex,
     ref XInputVibration pVibration
     );
コード例 #2
0
ファイル: XInputInterops.cs プロジェクト: ThuCommix/Sharpex2D
 /// <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);
 }
コード例 #3
0
 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
 );
コード例 #4
0
 private static extern int XInputSetState14(int dwUserIndex, ref XInputVibration pVibration);
コード例 #5
0
 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);
 }
コード例 #6
0
ファイル: XInputJoystick.cs プロジェクト: RockyTV/opentk
        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;
        }
コード例 #7
0
 public static extern int XInputSetState(int userIndex, ref XInputVibration vibration);
コード例 #8
0
 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
 );
コード例 #9
0
ファイル: XInputInterops.cs プロジェクト: szlatyka/Sharpex2D
 /// <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));
 }