Exemplo n.º 1
0
        // 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)
                );
        }
Exemplo n.º 2
0
 // Get the DirectSound guids for sending/receiving audio to the controller's headset
 public static void GetAudioGuids(int controllerNumber, out Guid renderGuid, out Guid captureGuid)
 {
     XInputMethods.ProcessResult(XInputMethods.XInputGetDSoundAudioDeviceGuids(controllerNumber, out renderGuid, out captureGuid));
 }
Exemplo n.º 3
0
 // Poll the state of the controller's buttons, thumbsticks, and triggers
 public static void GetState(int controllerNumber, out XInputState state)
 {
     XInputMethods.ProcessResult(
         XInputMethods.XInputGetState(controllerNumber, out state)
         );
 }
Exemplo n.º 4
0
 // Get the capabilities of controller 0, 1, 2, or 3
 public static void GetCapabilities(int controllerNumber, out XInputCapabilities caps)
 {
     XInputMethods.ProcessResult(
         XInputMethods.XInputGetCapabilities(controllerNumber, 0, out caps)
         );
 }