Syntax
Parameters
This method has no parameters.Return value
Type: booltrue if the device is currently connected; otherwise, false.
Remarks
AnIGameInputDevice object remains valid after the physical device disconnects, so your application can keep a reference to it. While the device is disconnected, IsConnected returns false, and the device doesn’t produce new readings. If the device reconnects with the same device ID (see IGameInputDevice::GetDeviceId), GameInput reuses the same device object, and IsConnected returns true again.
To be notified when a device connects or disconnects instead of polling this method, register a device callback by calling IGameInput::RegisterDeviceCallback. The callback receives the GameInputDeviceEventConnected and GameInputDeviceEventDisconnected values of GameInputDeviceEvent.
In GameInput v3 and earlier, you checked for the GameInputDeviceConnected flag in the value returned by IGameInputDevice::GetDeviceStatus.
Requirements
Header: GameInput.h Library: gameinput.lib Supported platforms: Windows, XBOX One family consoles and XBOX Series consolesSee also
Overview of GameInputIGameInputDevice
GameInputDeviceEvent
IGameInput::RegisterDeviceCallback
