> ## 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

Describe el tipo y el estado de carga de una batería.

<a id="syntaxSection" />

## Sintaxis

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

<a id="membersSection" />

### Miembros

*BatteryType*\
Tipo: BYTE

El tipo de la batería, como uno de los valores siguientes:

| Valor                       | Descripción                                                           |
| --------------------------- | --------------------------------------------------------------------- |
| BATTERY\_TYPE\_DISCONNECTED | El dispositivo no está conectado.                                     |
| BATTERY\_TYPE\_WIRED        | El dispositivo es con cable y no tiene batería.                       |
| BATTERY\_TYPE\_ALKALINE     | El dispositivo tiene una batería alcalina.                            |
| BATTERY\_TYPE\_NIMH         | El dispositivo tiene una batería de níquel e hidruro metálico (NiMH). |
| BATTERY\_TYPE\_UNKNOWN      | El dispositivo tiene un tipo de batería desconocido.                  |

*BatteryLevel*\
Tipo: BYTE

El estado de carga de la batería, en comparación con su capacidad de carga completa, como uno de los valores siguientes:

| Valor                  | Descripción                             |
| ---------------------- | --------------------------------------- |
| BATTERY\_LEVEL\_EMPTY  | La carga está entre cero y el 10 %.     |
| BATTERY\_LEVEL\_LOW    | La carga está entre el 10 % y el 40 %.  |
| BATTERY\_LEVEL\_MEDIUM | La carga está entre el 40 % y el 70 %.  |
| BATTERY\_LEVEL\_FULL   | La carga está entre el 70 % y el 100 %. |

<a id="remarksSection" />

## Comentarios

El valor *BatteryLevel* solo es válido para un dispositivo que tiene un tipo de batería conocido.

Esta estructura la usa la función [XInputGetBatteryInformation](/reference/input/xinputongameinput/functions/xinputgetbatteryinformation).

Para obtener más información, consulte [El contenedor XInputOnGameInput](/build/core-features/common/input/porting/input-porting-xinput#xinputWrapperSection).

<a id="requirementsSection" />

## Requisitos

**Encabezado:** XInputOnGameInput.h

**Plataformas compatibles:** consolas de la familia XBOX One y consolas XBOX Series

<a id="seealsoSection" />

## Consulte también

[Portabilidad de XInput a GameInput](/build/core-features/common/input/porting/input-porting-xinput)\
[XInputOnGameInput](/reference/input/xinputongameinput/xinputongameinput_members)


## Related topics

- [XInputGetBatteryInformation](/es/reference/input/xinputongameinput/functions/xinputgetbatteryinformation.md)
- [XInputOnGameInput](/es/reference/input/xinputongameinput/xinputongameinput_members.md)
- [XINPUT_GAMEPAD](/es/reference/input/xinputongameinput/structs/xinput_gamepad.md)
- [XINPUT_CAPABILITIES](/es/reference/input/xinputongameinput/structs/xinput_capabilities.md)
- [XINPUT_KEYSTROKE](/es/reference/input/xinputongameinput/structs/xinput_keystroke.md)
