DeviceCommand Перечисление

Определение

Команды, которые можно выполнять на гарнитуре GIP (протокол ввода игр).

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
Наследование
DeviceCommand
Атрибуты

Требования к Windows

Семейство устройств
Windows Desktop Extension SDK (появилось в 10.0.23665.0)
API contract
Windows.Gaming.Input.GamingInputPreviewContract (появилось в v2.0)

Поля

Reset 0

Сбрасывает гарнитуру.

Примеры

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);
}

Комментарии

Внимание!

Чтобы избежать повреждения устройств, API-интерфейсы управления гарнитурой следует использовать только с оборудованием, которое вы разработали.

Применяется к