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

> 입력 장치가 현재 연결되어 있는지 여부를 나타냅니다.

입력 장치가 현재 연결되어 있는지 여부를 나타냅니다.

## 구문

```cpp theme={null}
bool IsConnected();
```

### 매개변수

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

### 반환값

형식: bool

장치가 현재 연결되어 있으면 `true`이고, 그렇지 않으면 `false`입니다.

## 설명

`IGameInputDevice` 개체는 물리적 장치의 연결이 끊어진 후에도 유효하므로, 애플리케이션은 해당 개체에 대한 참조를 유지할 수 있습니다. 장치 연결이 끊어져 있는 동안 `IsConnected`는 `false`를 반환하며, 장치는 새 판독값을 생성하지 않습니다. 장치가 동일한 장치 ID([IGameInputDevice::GetDeviceId](https://docs.xbox.com/ko/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_getdeviceid.md) 참조)로 다시 연결되면 GameInput은 동일한 장치 개체를 재사용하며, `IsConnected`는 다시 `true`를 반환합니다.

이 메서드를 폴링하는 대신 장치가 연결되거나 연결이 끊어질 때 알림을 받으려면 [IGameInput::RegisterDeviceCallback](https://docs.xbox.com/ko/reference/input/gameinput/interfaces/igameinput/methods/igameinput_registerdevicecallback.md)을 호출하여 장치 콜백을 등록하세요. 콜백은 [GameInputDeviceEvent](https://learn.microsoft.com/en-us/gaming/gdk/docs/reference/input/gameinput/enums/gameinputdeviceevent)의 `GameInputDeviceEventConnected` 및 `GameInputDeviceEventDisconnected` 값을 받습니다.

GameInput v3 이하에서는 [IGameInputDevice::GetDeviceStatus](https://docs.xbox.com/ko/reference/input/gameinput/deprecated/interfaces/igameinputdevice/methods/igameinputdevice_getdevicestatus.md)가 반환하는 값에서 `GameInputDeviceConnected` 플래그를 확인했습니다.

## 요구 사항

**헤더:** GameInput.h

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

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

## 함께 보기

[GameInput 개요](https://docs.xbox.com/ko/build/core-features/common/input/overviews/input-overview.md)\
[IGameInputDevice](https://docs.xbox.com/ko/reference/input/gameinput/interfaces/igameinputdevice/igameinputdevice.md)\
[GameInputDeviceEvent](https://learn.microsoft.com/en-us/gaming/gdk/docs/reference/input/gameinput/enums/gameinputdeviceevent)\
[IGameInput::RegisterDeviceCallback](https://docs.xbox.com/ko/reference/input/gameinput/interfaces/igameinput/methods/igameinput_registerdevicecallback.md)

## 버전 기록

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


## Related topics

- [GameInputDeviceStatus (사용되지 않음)](https://docs.xbox.com/ko/reference/input/gameinput/deprecated/enums/gameinputdevicestatus.md)
- [GetDeviceStatus (사용되지 않음)](https://docs.xbox.com/ko/reference/input/gameinput/deprecated/interfaces/igameinputdevice/methods/igameinputdevice_getdevicestatus.md)
- [GameInputDeviceCallback](https://docs.xbox.com/ko/reference/input/gameinput/functions/gameinputdevicecallback.md)
- [GameInput API 멤버](https://docs.xbox.com/ko/reference/input/gameinput/gameinput_members.md)
- [GameInput API 버전 관리](https://docs.xbox.com/ko/build/core-features/common/input/overviews/input-versioning.md)
