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

> 장치에 있는 모션 및 방향 센서와 같은 장치의 센서 속성을 검색합니다.

장치에 있는 모션 및 방향 센서와 같은 장치의 센서 속성을 검색합니다.

## 구문

```cpp theme={null}
bool GetSensorsInfo(
    GameInputSensorsInfo* info
);
```

### 매개변수

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

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

### 반환값

형식: bool

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

## 설명

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

`supportedSensors` 멤버는 장치의 센서를 식별하는 [GameInputSensorsKind](https://docs.xbox.com/ko/reference/input/gameinput/enums/gameinputsensorskind.md) 플래그의 조합입니다. 센서 상태는 [IGameInputReading::GetSensorsState](https://docs.xbox.com/ko/reference/input/gameinput/interfaces/igameinputreading/methods/igameinputreading_getsensorsstate.md)를 사용하여 판독값에서 읽습니다.

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

다음 예제는 장치의 센서 속성을 쿼리하는 방법을 보여줍니다.

```cpp theme={null}
GameInputSensorsInfo info;
if (device->GetSensorsInfo(&info))
{
    if (info.supportedSensors & GameInputSensorsGyrometer)
    {
        // Enable gyro aiming.
    }
}
```

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) 구조체의 `sensorsInfo` 멤버에서 이 정보를 얻을 수 있었습니다.

## 요구 사항

**헤더:** GameInput.h

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

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

## 함께 보기

[GameInput 개요](https://docs.xbox.com/ko/build/core-features/common/input/overviews/input-overview.md)\
[GameInputSensorsInfo](https://docs.xbox.com/ko/reference/input/gameinput/structs/gameinputsensorsinfo.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)\
[GameInputSensorsKind](https://docs.xbox.com/ko/reference/input/gameinput/enums/gameinputsensorskind.md)\
[IGameInputReading::GetSensorsState](https://docs.xbox.com/ko/reference/input/gameinput/interfaces/igameinputreading/methods/igameinputreading_getsensorsstate.md)\
[IGameInputDevice](https://docs.xbox.com/ko/reference/input/gameinput/interfaces/igameinputdevice/igameinputdevice.md)

## 버전 기록

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


## Related topics

- [GameInputSensorsInfo](https://docs.xbox.com/ko/reference/input/gameinput/structs/gameinputsensorsinfo.md)
- [GameInputSensorsKind](https://docs.xbox.com/ko/reference/input/gameinput/enums/gameinputsensorskind.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)
- [IGameInputDevice::GetGamepadInfo](https://docs.xbox.com/ko/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_getgamepadinfo.md)
