GameControllerBatteryChargingState Enum
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Battery charging state of the controller.
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
- Inheritance
-
GameControllerBatteryChargingState
- Attributes
Windows requirements
Device family |
Windows Desktop Extension SDK (introduced in 10.0.23665.0)
|
API contract |
Windows.Gaming.Input.GamingInputPreviewContract (introduced in v2.0)
|
Fields
Active | 2 | The battery is charging. |
Error | 3 | The controller has reported a charging error. |
Inactive | 1 | The battery is not charging. |
Unknown | 0 | The battery charging state is unknown. |
Examples
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);
}
Applies to
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for