Skip to main content

GetDeviceStatus

检索输入设备的当前状态。

语法

参数

此方法没有参数。

返回值

类型:GameInputDeviceStatus 返回的值是枚举类型 GameInputDeviceStatus。返回的值可能是来自 GameInputDeviceStatus 的枚举标志值的组合。

注解

返回的 GameInputDeviceStatus 枚举定义了设备是否已连接,以及游戏与设备之间可以传输的输入和输出类型。如果在设备已从系统断开连接时调用 GetDeviceStatus 方法,将返回 GameInputDeviceNoStatus 值。您可以将 GameInputDeviceStatus 枚举用作 RegisterDeviceCallback 方法的过滤器,以对设备状态的特定变化作出响应。

要求

头文件: GameInput.h GameInput 概述
GameInputDeviceStatus
RegisterDeviceCallback
IGameInputDevice

版本历史

最后修改于 2026年8月13日