跳转到主要内容
获取输入设备上可用的系统按钮。

语法

参数

此方法没有参数。

返回值

类型:GameInputSystemButtons GameInputSystemButtons 标志的组合,描述设备上的系统按钮,例如 GameInputSystemButtonGuide 和 GameInputSystemButtonShare。如果设备没有系统按钮,则返回 GameInputSystemButtonNone。

备注

系统按钮是通常用于控制系统而非游戏的按钮,例如 XBOX 控制器上的 Guide 按钮。在 GameInput v4 中,系统按钮是一种普通的输入类型 (GameInputKindSystemButton)。来自具有系统按钮的设备的读数包含这些按钮的状态,你可以通过调用 IGameInputReading::GetSystemButtonState 检索该状态。 支持的系统按钮集在设备对象的生存期内不会更改。 在 GameInput v3 及更早版本中,此信息可从 IGameInputDevice::GetDeviceInfo 返回的 GameInputDeviceInfo 结构的 supportedSystemButtons 成员中获取。

要求

头文件: GameInput.h 库: gameinput.lib 支持的平台: Windows、XBOX One 系列主机和 XBOX Series 主机

另请参阅

GameInput 概述
IGameInputDevice
GameInputSystemButtons
IGameInputReading::GetSystemButtonState

版本历史

最后修改于 2026年11月6日