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

Определение

Тип батареи в контроллере.

public enum class GameControllerBatteryKind
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Gaming.Input.GamingInputPreviewContract, 131072)]
enum class GameControllerBatteryKind
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Gaming.Input.GamingInputPreviewContract), 131072)]
public enum GameControllerBatteryKind
var value = Windows.Gaming.Input.Preview.GameControllerBatteryKind.unknown
Public Enum GameControllerBatteryKind
Наследование
GameControllerBatteryKind
Атрибуты

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

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

Поля

None 1

Контроллер не имеет батареи.

Rechargeable 3

Контроллер имеет перезаряжаемый аккумулятор.

Standard 2

Контроллер имеет неперезаряжаемый аккумулятор.

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

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