> ## Documentation Index
> Fetch the complete documentation index at: https://devdocs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# XINPUT_BATTERY_INFORMATION

> XINPUT_BATTERY_INFORMATION

# XINPUT\_BATTERY\_INFORMATION

Décrit le type et l'état de charge d'une pile.

<a id="syntaxSection" />

## Syntaxe

```cpp theme={null}
typedef struct XINPUT_BATTERY_INFORMATION {  
    BYTE BatteryType;  
    BYTE BatteryLevel;  
} XINPUT_BATTERY_INFORMATION  
```

<a id="membersSection" />

### Membres

*BatteryType*\
Type : BYTE

Type de la pile, parmi les valeurs suivantes :

| Valeur | Description |
| - | - |
| BATTERY\_TYPE\_DISCONNECTED | L'appareil n'est pas connecté. |
| BATTERY\_TYPE\_WIRED | L'appareil est avec fil et n'a pas de pile. |
| BATTERY\_TYPE\_ALKALINE | L'appareil a une pile alcaline. |
| BATTERY\_TYPE\_NIMH | L'appareil a une pile au nickel-hydrure métallique (NiMH). |
| BATTERY\_TYPE\_UNKNOWN | L'appareil a un type de pile inconnu. |

*BatteryLevel*\
Type : BYTE

État de charge de la pile, par rapport à sa capacité de pleine charge, parmi les valeurs suivantes :

| Valeur | Description |
| - | - |
| BATTERY\_LEVEL\_EMPTY | La charge se situe entre zéro et 10 %. |
| BATTERY\_LEVEL\_LOW | La charge se situe entre 10 % et 40 %. |
| BATTERY\_LEVEL\_MEDIUM | La charge se situe entre 40 % et 70 %. |
| BATTERY\_LEVEL\_FULL | La charge se situe entre 70 % et 100 %. |

<a id="remarksSection" />

## Remarques

La valeur *BatteryLevel* n'est valide que pour un appareil dont le type de pile est connu.

Cette structure est utilisée par la fonction [XInputGetBatteryInformation](/fr-CA/reference/input/xinputongameinput/functions/xinputgetbatteryinformation).

Pour plus d'informations, consultez [Le wrapper XInputOnGameInput](/fr-CA/build/core-features/common/input/porting/input-porting-xinput#xinputWrapperSection).

<a id="requirementsSection" />

## Configuration requise

**En-tête :** XInputOnGameInput.h

**Plateformes prises en charge :** consoles de la famille XBOX One et consoles XBOX Series

<a id="seealsoSection" />

## Voir aussi

[Portage d'XInput vers GameInput](/fr-CA/build/core-features/common/input/porting/input-porting-xinput)\
[XInputOnGameInput](/fr-CA/reference/input/xinputongameinput/xinputongameinput_members)


## Related topics

- [XINPUT_BATTERY_INFORMATION](/reference/input/xinputongameinput/structs/xinput_battery_information.md)
- [XInputGetBatteryInformation](/reference/input/xinputongameinput/functions/xinputgetbatteryinformation.md)
