检索某一输入设备的当前状态。
语法
GameInputDeviceStatus GetDeviceStatus();
参数
此方法没有任何参数。
返回值
返回的值是枚举类型 GameInputDeviceStatus 返回的值可以是来自 GameInputDeviceStatus 的枚举的标志值的组合。
备注
返回的 GameInputDeviceStatus 枚举定义该设备是否连接,以及可在游戏和设备之间传输的输入和输出的类型。 如果在设备与系统断开连接时调用 GetDeviceStatus 方法,则返回 GameInputDeviceNoStatus 值。 可以使用 GameInputDeviceStatus 枚举作为针对 RegisterDeviceCallback 方法的筛选器,以对某一设备状态中的特定更改作出响应。
要求
头文件:GameInput.h
库:gameinput.lib
支持的平台: 窗户
另请参阅
GameInputGameInputDeviceStatusRegisterDeviceCallbackIGameInputDevice 概述