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

# IGameInputDevice::GetGamepadInfo

> Recupera las propiedades de mando de juego del dispositivo, como la distribución de botones que admite y las etiquetas de sus controles.

Recupera las propiedades de mando de juego del dispositivo, como la distribución de botones que admite y las etiquetas de sus controles.

## Sintaxis

```cpp theme={null}
bool GetGamepadInfo(
    GameInputGamepadInfo* info
);
```

### Parámetros

*info*   \_Out\_\
Tipo: [GameInputGamepadInfo](https://docs.xbox.com/es/reference/input/gameinput/structs/gameinputgamepadinfo.md)\*

Puntero a una estructura `GameInputGamepadInfo` que recibe las propiedades de mando de juego del dispositivo. Si el dispositivo no admite la entrada de mando de juego, todos los miembros de la estructura se establecen en cero.

### Valor devuelto

Tipo: bool

`true` si el dispositivo admite la entrada de mando de juego y se rellenó *info*; de lo contrario, `false`.

## Comentarios

El método `GetGamepadInfo` copia las propiedades de mando de juego del dispositivo en la estructura proporcionada por el autor de la llamada. Un dispositivo admite la entrada de mando de juego cuando el valor devuelto por [GetSupportedInput](https://docs.xbox.com/es/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_getsupportedinput.md) incluye `GameInputKindGamepad`. Si el dispositivo no admite la entrada de mando de juego, `GetGamepadInfo` inicializa *info* con ceros y devuelve `false`.

El miembro `supportedLayout` es una combinación de marcas de [GameInputGamepadButtons](https://docs.xbox.com/es/reference/input/gameinput/enums/gameinputgamepadbuttons.md) que identifica qué botones estándar de mando de juego tiene el dispositivo. Los miembros de etiqueta describen las marcas impresas en los controles correspondientes, como valores de [GameInputLabel](https://docs.xbox.com/es/reference/input/gameinput/enums/gameinputlabel.md), para que pueda mostrar indicaciones coincidentes en la interfaz de usuario. Los miembros `extraButtonCount` y `extraAxisCount` indican cuántos botones y ejes de mando tiene el dispositivo además de la asignación estándar de mando de juego; use [GetExtraButtonIndexes](https://docs.xbox.com/es/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_getextrabuttonindexes.md) y [GetExtraAxisIndexes](https://docs.xbox.com/es/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_getextraaxisindexes.md) para localizarlos en el estado del mando de una lectura. El estado del mando de juego se lee de las lecturas mediante [IGameInputReading::GetGamepadState](https://docs.xbox.com/es/reference/input/gameinput/interfaces/igameinputreading/methods/igameinputreading_getgamepadstate.md).

Las propiedades que devuelve este método son fijas durante la vida útil del dispositivo, por lo que puede consultarlas una vez (por ejemplo, cuando se conecta el dispositivo) y almacenar en caché el resultado.

En el siguiente ejemplo se muestra cómo consultar las propiedades de mando de juego de un dispositivo.

```cpp theme={null}
GameInputGamepadInfo info;
if (device->GetGamepadInfo(&info))
{
    if (info.aButtonLabel == GameInputLabelXboxA)
    {
        // Show XBOX-style button prompts.
    }
}
```

En GameInput v3 y versiones anteriores, esta información estaba disponible en el miembro `gamepadInfo` de la estructura [GameInputDeviceInfo](https://docs.xbox.com/es/reference/input/gameinput/deprecated/structs/gameinputdeviceinfo.md) devuelta por [IGameInputDevice::GetDeviceInfo](https://docs.xbox.com/es/reference/input/gameinput/deprecated/interfaces/igameinputdevice/methods/igameinputdevice_getdeviceinfo.md).

## Requisitos

**Encabezado:** GameInput.h

**Biblioteca:** gameinput.lib

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

## Consulte también

[Información general de GameInput](https://docs.xbox.com/es/build/core-features/common/input/overviews/input-overview.md)\
[GameInputGamepadInfo](https://docs.xbox.com/es/reference/input/gameinput/structs/gameinputgamepadinfo.md)\
[GetSupportedInput](https://docs.xbox.com/es/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_getsupportedinput.md)\
[GameInputKind](https://docs.xbox.com/es/reference/input/gameinput/enums/gameinputkind.md)\
[GameInputGamepadButtons](https://docs.xbox.com/es/reference/input/gameinput/enums/gameinputgamepadbuttons.md)\
[GameInputLabel](https://docs.xbox.com/es/reference/input/gameinput/enums/gameinputlabel.md)\
[IGameInputReading::GetGamepadState](https://docs.xbox.com/es/reference/input/gameinput/interfaces/igameinputreading/methods/igameinputreading_getgamepadstate.md)\
[IGameInputDevice](https://docs.xbox.com/es/reference/input/gameinput/interfaces/igameinputdevice/igameinputdevice.md)

## Historial de versiones

| Versión | Cambios |
| - | - |
| **v4** | Se introdujo. |


## Related topics

- [GameInputGamepadInfo](https://docs.xbox.com/es/reference/input/gameinput/structs/gameinputgamepadinfo.md)
- [IGameInputDevice::GetSupportedInput](https://docs.xbox.com/es/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_getsupportedinput.md)
- [IGameInputDevice::GetUsage](https://docs.xbox.com/es/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_getusage.md)
- [IGameInputDevice::GetInputReportInfo](https://docs.xbox.com/es/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_getinputreportinfo.md)
- [IGameInputDevice::GetKeyboardInfo](https://docs.xbox.com/es/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_getkeyboardinfo.md)
