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

> 장치에 있는 햇 스위치 및 방향 패드와 같은 일반 컨트롤러 스위치의 수를 가져옵니다.

장치에 있는 햇 스위치 및 방향 패드와 같은 일반 컨트롤러 스위치의 수를 가져옵니다.

## 구문

```cpp theme={null}
uint32_t GetControllerSwitchCount();
```

### 매개변수

이 메서드에는 매개변수가 없습니다.

### 반환값

형식: uint32\_t

장치에 있는 컨트롤러 스위치의 수이며, 장치에 컨트롤러 스위치가 없으면 0입니다.

## 설명

컨트롤러 스위치는 햇 스위치 및 방향 패드와 같은 장치의 원시 매핑되지 않은 다중 위치 스위치입니다. [GetSupportedInput](https://docs.xbox.com/ko/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_getsupportedinput.md)이 반환하는 값에 `GameInputKindControllerSwitch`가 포함되어 있으면 장치에 컨트롤러 스위치가 있는 것입니다. `GameInputKindControllerSwitch`를 포함하는 장치의 판독값은 [IGameInputReading::GetControllerSwitchCount](https://docs.xbox.com/ko/reference/input/gameinput/interfaces/igameinputreading/methods/igameinputreading_getcontrollerswitchcount.md)를 통해 같은 수의 스위치를 보고합니다.

반환된 값을 사용하여 [GetControllerSwitchInfo](https://docs.xbox.com/ko/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_getcontrollerswitchinfo.md) 또는 [IGameInputReading::GetControllerSwitchState](https://docs.xbox.com/ko/reference/input/gameinput/interfaces/igameinputreading/methods/igameinputreading_getcontrollerswitchstate.md)에 전달하는 배열의 크기를 지정하세요. 스위치의 수는 장치가 연결되어 있는 동안 변경되지 않습니다.

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) 구조체의 `controllerInfo` 멤버가 참조하는 [GameInputControllerInfo](https://docs.xbox.com/ko/reference/input/gameinput/deprecated/structs/gameinputcontrollerinfo.md) 구조체의 `controllerSwitchCount` 멤버에서 이 정보를 얻을 수 있었습니다.

## 요구 사항

**헤더:** GameInput.h

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

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

## 함께 보기

[GameInput 개요](https://docs.xbox.com/ko/build/core-features/common/input/overviews/input-overview.md)\
[GetControllerSwitchInfo](https://docs.xbox.com/ko/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_getcontrollerswitchinfo.md)\
[IGameInputReading::GetControllerSwitchCount](https://docs.xbox.com/ko/reference/input/gameinput/interfaces/igameinputreading/methods/igameinputreading_getcontrollerswitchcount.md)\
[IGameInputReading::GetControllerSwitchState](https://docs.xbox.com/ko/reference/input/gameinput/interfaces/igameinputreading/methods/igameinputreading_getcontrollerswitchstate.md)\
[IGameInputDevice](https://docs.xbox.com/ko/reference/input/gameinput/interfaces/igameinputdevice/igameinputdevice.md)

## 버전 기록

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


## Related topics

- [IGameInputDevice::GetControllerSwitchInfo](https://docs.xbox.com/ko/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_getcontrollerswitchinfo.md)
- [GetControllerSwitchCount](https://docs.xbox.com/ko/reference/input/gameinput/interfaces/igameinputreading/methods/igameinputreading_getcontrollerswitchcount.md)
- [IGameInputDevice::GetControllerAxisCount](https://docs.xbox.com/ko/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_getcontrolleraxiscount.md)
- [IGameInputDevice::GetControllerButtonCount](https://docs.xbox.com/ko/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_getcontrollerbuttoncount.md)
- [IGameInputDevice::GetControllerAxisLabels](https://docs.xbox.com/ko/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_getcontrolleraxislabels.md)
