> ## 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](/zh-TW/reference/input/gameinput/gameinput_members)\
[GameInput 概觀](/zh-TW/build/core-features/common/input/overviews/input-overview)\
[IGameInputDevice](/zh-TW/reference/input/gameinput/interfaces/igameinputdevice/igameinputdevice)

## 版本歷程記錄

| 版本 | 變更 |
| - | - |
| **v0** | 已推出。 |


## Related topics

- [IGameInputDevice](/zh-TW/reference/input/gameinput/interfaces/igameinputdevice/igameinputdevice.md)
- [GameInputForceFeedbackMotorInfo](/zh-TW/reference/input/gameinput/structs/gameinputforcefeedbackmotorinfo.md)
- [IGameInputDevice::SetForceFeedbackMotorGain](/zh-TW/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_setforcefeedbackmotorgain.md)
- [IGameInputForceFeedbackEffect::GetMotorIndex](/zh-TW/reference/input/gameinput/interfaces/igameinputforcefeedbackeffect/methods/igameinputforcefeedbackeffect_getmotorindex.md)
- [CreateForceFeedbackEffect](/zh-TW/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_createforcefeedbackeffect.md)
