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

> 지원되는 버튼 레이아웃 및 컨트롤의 레이블과 같은 장치의 게임패드 속성을 검색합니다.

지원되는 버튼 레이아웃 및 컨트롤의 레이블과 같은 장치의 게임패드 속성을 검색합니다.

## 구문

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

### 매개변수

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

장치의 게임패드 속성을 받는 `GameInputGamepadInfo` 구조체에 대한 포인터입니다. 장치가 게임패드 입력을 지원하지 않으면 구조체의 모든 멤버가 0으로 설정됩니다.

### 반환값

형식: bool

장치가 게임패드 입력을 지원하고 *info*가 채워졌으면 `true`이고, 그렇지 않으면 `false`입니다.

## 설명

`GetGamepadInfo` 메서드는 장치의 게임패드 속성을 호출자가 제공한 구조체에 복사합니다. [GetSupportedInput](https://docs.xbox.com/ko/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_getsupportedinput.md)이 반환하는 값에 `GameInputKindGamepad`가 포함되어 있으면 장치가 게임패드 입력을 지원하는 것입니다. 장치가 게임패드 입력을 지원하지 않으면 `GetGamepadInfo`는 *info*를 0으로 초기화하고 `false`를 반환합니다.

`supportedLayout` 멤버는 장치에 있는 표준 게임패드 버튼을 식별하는 [GameInputGamepadButtons](https://docs.xbox.com/ko/reference/input/gameinput/enums/gameinputgamepadbuttons.md) 플래그의 조합입니다. 레이블 멤버는 해당 컨트롤에 인쇄된 표시를 [GameInputLabel](https://docs.xbox.com/ko/reference/input/gameinput/enums/gameinputlabel.md) 값으로 설명하므로, UI에 일치하는 프롬프트를 표시할 수 있습니다. `extraButtonCount` 및 `extraAxisCount` 멤버는 장치에 표준 게임패드 매핑 이외에 있는 컨트롤러 버튼 및 축의 수를 보고합니다. 판독값의 컨트롤러 상태에서 이러한 버튼과 축의 위치를 찾으려면 [GetExtraButtonIndexes](https://docs.xbox.com/ko/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_getextrabuttonindexes.md) 및 [GetExtraAxisIndexes](https://docs.xbox.com/ko/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_getextraaxisindexes.md)를 사용하세요. 게임패드 상태는 [IGameInputReading::GetGamepadState](https://docs.xbox.com/ko/reference/input/gameinput/interfaces/igameinputreading/methods/igameinputreading_getgamepadstate.md)를 사용하여 판독값에서 읽습니다.

이 메서드가 반환하는 속성은 장치의 수명 동안 고정되어 있으므로 한 번(예: 장치가 연결될 때) 쿼리하고 결과를 캐시할 수 있습니다.

다음 예제는 장치의 게임패드 속성을 쿼리하는 방법을 보여줍니다.

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

GameInput v3 이하에서는 [IGameInputDevice::GetDeviceInfo](https://docs.xbox.com/ko/reference/input/gameinput/deprecated/interfaces/igameinputdevice/methods/igameinputdevice_getdeviceinfo.md)가 반환하는 [GameInputDeviceInfo](https://docs.xbox.com/ko/reference/input/gameinput/deprecated/structs/gameinputdeviceinfo.md) 구조체의 `gamepadInfo` 멤버에서 이 정보를 얻을 수 있었습니다.

## 요구 사항

**헤더:** GameInput.h

**라이브러리:** gameinput.lib

**지원되는 플랫폼:** Windows, XBOX One 제품군 콘솔 및 XBOX Series 콘솔

## 함께 보기

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

## 버전 기록

| 버전 | 변경 사항 |
| - | - |
| **v4** | 도입됨. |


## Related topics

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