Share via


DeviceCommand Enumerazione

Definizione

Comandi che possono essere eseguiti su un visore GIP (Gaming Input Protocol).

public enum class DeviceCommand
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Gaming.Input.GamingInputPreviewContract, 131072)]
enum class DeviceCommand
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Gaming.Input.GamingInputPreviewContract), 131072)]
public enum DeviceCommand
var value = Windows.Gaming.Input.Preview.DeviceCommand.reset
Public Enum DeviceCommand
Ereditarietà
DeviceCommand
Attributi

Requisiti Windows

Famiglia di dispositivi
Windows Desktop Extension SDK (è stato introdotto in 10.0.23665.0)
API contract
Windows.Gaming.Input.GamingInputPreviewContract (è stato introdotto in v2.0)

Campi

Reset 0

Reimposta il visore.

Esempio

public void SetupHeadset(IGameControllerProvider headsetProvider)
{
    LegacyGipGameControllerProvider legacyGipGameControllerProvider =
        LegacyGipGameControllerProvider.FromGameControllerProvider(headsetProvider);

    // Reset the device
    legacyGipGameControllerProvider.ExecuteCommand(DeviceCommand.Reset);

    // Check the smart mute level
    byte[] smartMuteBuffer =
        legacyGipGameControllerProvider.GetHeadsetOperation(HeadsetOperation.SmartMute);
    HeadsetLevel smartMuteValue = (HeadsetLevel)smartMuteBuffer[0];

    // Set bass boost to 3db
    byte[] bassBuffer = BitConverter.GetBytes((UInt32)3);
    legacyGipGameControllerProvider.SetHeadsetOperation(HeadsetOperation.BassBoostGain,
        bassBuffer);
}

Commenti

Attenzione

Per evitare danni ai dispositivi, le API del controllo visore devono essere usate solo con hardware sviluppato.

Si applica a