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

> 获取输入设备上可用的震动电机。

获取输入设备上可用的震动电机。

## 语法

```cpp theme={null}
GameInputRumbleMotors GetSupportedRumbleMotors();
```

### 参数

此方法没有参数。

### 返回值

类型：[GameInputRumbleMotors](https://docs.xbox.com/zh-CN/reference/input/gameinput/enums/gameinputrumblemotors.md)

`GameInputRumbleMotors` 标志的组合，描述设备上的震动电机。如果设备没有震动电机，则返回 `GameInputRumbleNone`。

## 备注

使用 [IGameInputDevice::SetRumbleState](https://docs.xbox.com/zh-CN/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_setrumblestate.md) 控制震动电机。应用程序在调用 `SetRumbleState` 之前无需检查设备支持哪些电机；如果设备缺少某个电机，GameInput 会尝试使用其他电机模拟其效果。当你希望根据实际存在的电机调整反馈设计时（例如使用脉冲扳机电机时），请使用此方法。

支持的震动电机集在设备对象的生存期内不会更改。

在 GameInput v3 及更早版本中，此信息可从 [IGameInputDevice::GetDeviceInfo](https://docs.xbox.com/zh-CN/reference/input/gameinput/deprecated/interfaces/igameinputdevice/methods/igameinputdevice_getdeviceinfo.md) 返回的 [GameInputDeviceInfo](https://docs.xbox.com/zh-CN/reference/input/gameinput/deprecated/structs/gameinputdeviceinfo.md) 结构的 `supportedRumbleMotors` 成员中获取。

## 要求

**头文件：** GameInput.h

**库：** gameinput.lib

**支持的平台：** Windows、XBOX One 系列主机和 XBOX Series 主机

## 另请参阅

[GameInput 概述](https://docs.xbox.com/zh-CN/build/core-features/common/input/overviews/input-overview.md)\
[IGameInputDevice](https://docs.xbox.com/zh-CN/reference/input/gameinput/interfaces/igameinputdevice/igameinputdevice.md)\
[GameInputRumbleMotors](https://docs.xbox.com/zh-CN/reference/input/gameinput/enums/gameinputrumblemotors.md)\
[IGameInputDevice::SetRumbleState](https://docs.xbox.com/zh-CN/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_setrumblestate.md)

## 版本历史

| 版本 | 变更 |
| - | - |
| **v4** | 引入。 |


## Related topics

- [GameInputRumbleMotors](https://docs.xbox.com/zh-CN/reference/input/gameinput/enums/gameinputrumblemotors.md)
- [IGameInputDevice::GetSupportedInput](https://docs.xbox.com/zh-CN/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_getsupportedinput.md)
- [IGameInputDevice::GetSupportedLightingGroups](https://docs.xbox.com/zh-CN/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_getsupportedlightinggroups.md)
- [IGameInputDevice::GetSupportedLightingGroupSize](https://docs.xbox.com/zh-CN/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_getsupportedlightinggroupsize.md)
- [IGameInputDevice::GetDeviceFamily](https://docs.xbox.com/zh-CN/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_getdevicefamily.md)
