> ## Documentation Index
> Fetch the complete documentation index at: https://devdocs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# IsForceFeedbackMotorPoweredOn

> IsForceFeedbackMotorPoweredOn

# IsForceFeedbackMotorPoweredOn

指示某个特定的力反馈电机是否已通电。

## 语法

```cpp theme={null}
bool IsForceFeedbackMotorPoweredOn(
    uint32_t motorIndex
);
```

### 参数

*motorIndex*   \_In\_\
类型:uint32\_t

力反馈电机索引。

### 返回值

类型:bool

如果力反馈电机未通电，则返回 false。如果力反馈电机已通电，则返回 true。

## 注解

力反馈电机需要外部电源，因为 USB 连接无法为电机提供足够的电流。因此，电机的供电状态不受软件控制。但可以对其进行报告，以便应用程序通知用户。

当电机未通电时，任何 GameInput 力反馈方法的行为都不会发生变化；因此设备不会播放任何效果。本质上，这些 API 就如同该进程未获得输入焦点时那样运行。如果在未通电的力反馈电机上加载了效果，随后电机通电，则这些效果将开始播放，就像该进程获得了输入焦点一样。与输入焦点的行为相似，这样做是为了简化编程模型。

## 要求

**头文件:** GameInput.h

[GameInput](/reference/input/gameinput/gameinput_members)\
[GameInput 概述](/build/core-features/common/input/overviews/input-overview)\
[IGameInputDevice](/reference/input/gameinput/interfaces/igameinputdevice/igameinputdevice)

## 版本历史

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


## Related topics

- [IGameInputDevice::SetForceFeedbackMotorGain](/zh-CN/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_setforcefeedbackmotorgain.md)
- [IGameInputForceFeedbackEffect::GetMotorIndex](/zh-CN/reference/input/gameinput/interfaces/igameinputforcefeedbackeffect/methods/igameinputforcefeedbackeffect_getmotorindex.md)
- [CreateForceFeedbackEffect](/zh-CN/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_createforcefeedbackeffect.md)
- [IGameInputForceFeedbackEffect::GetGain](/zh-CN/reference/input/gameinput/interfaces/igameinputforcefeedbackeffect/methods/igameinputforcefeedbackeffect_getgain.md)
- [IGameInputForceFeedbackEffect::SetGain](/zh-CN/reference/input/gameinput/interfaces/igameinputforcefeedbackeffect/methods/igameinputforcefeedbackeffect_setgain.md)
