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

Определение

Состояние зарядки батареи контроллера.

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

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

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

Поля

Active 2

Аккумулятор заряжается.

Error 3

Контроллер сообщил об ошибке зарядки.

Inactive 1

Аккумулятор не заряжается.

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

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