Freigeben über


GameControllerBatteryChargingState Enumeration

Definition

Akkuladezustand des Controllers.

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
Vererbung
GameControllerBatteryChargingState
Attribute

Windows-Anforderungen

Gerätefamilie
Windows Desktop Extension SDK (eingeführt in 10.0.23665.0)
API contract
Windows.Gaming.Input.GamingInputPreviewContract (eingeführt in v2.0)

Felder

Active 2

Der Akku wird aufgeladen.

Error 3

Der Controller hat einen Ladefehler gemeldet.

Inactive 1

Der Akku wird nicht aufgeladen.

Unknown 0

Der Ladezustand des Akkus ist unbekannt.

Beispiele

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

Gilt für: