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

> Obtém o número de motores de force feedback no dispositivo.

Obtém o número de motores de force feedback no dispositivo.

## Sintaxe

```cpp theme={null}
uint32_t GetForceFeedbackMotorCount();
```

### Parâmetros

Este método não tem parâmetros.

### Valor retornado

Tipo: uint32\_t

O número de motores de force feedback no dispositivo ou 0 se o dispositivo não oferecer suporte a force feedback.

## Comentários

Os motores de force feedback são endereçados por um índice de motor baseado em zero, que deve ser menor que o valor retornado por `GetForceFeedbackMotorCount`. Passe o índice do motor para [CreateForceFeedbackEffect](https://docs.xbox.com/pt-BR/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_createforcefeedbackeffect.md), [IsForceFeedbackMotorPoweredOn](https://docs.xbox.com/pt-BR/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_isforcefeedbackmotorpoweredon.md) e [SetForceFeedbackMotorGain](https://docs.xbox.com/pt-BR/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_setforcefeedbackmotorgain.md). Use [GetForceFeedbackMotorInfo](https://docs.xbox.com/pt-BR/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_getforcefeedbackmotorinfo.md) para descobrir a quais eixos e tipos de efeito cada motor oferece suporte. O número de motores não muda enquanto o dispositivo está conectado.

No GameInput v3 e anteriores, essas informações estavam disponíveis no membro `forceFeedbackMotorCount` da estrutura [GameInputDeviceInfo](https://docs.xbox.com/pt-BR/reference/input/gameinput/deprecated/structs/gameinputdeviceinfo.md) retornada por [IGameInputDevice::GetDeviceInfo](https://docs.xbox.com/pt-BR/reference/input/gameinput/deprecated/interfaces/igameinputdevice/methods/igameinputdevice_getdeviceinfo.md).

## Requisitos

**Cabeçalho:** GameInput.h

**Biblioteca:** gameinput.lib

**Plataformas com suporte:** Windows, consoles da família XBOX One e consoles XBOX Series

## Confira também

[Visão geral do GameInput](https://docs.xbox.com/pt-BR/build/core-features/common/input/overviews/input-overview.md)\
[GetForceFeedbackMotorInfo](https://docs.xbox.com/pt-BR/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_getforcefeedbackmotorinfo.md)\
[CreateForceFeedbackEffect](https://docs.xbox.com/pt-BR/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_createforcefeedbackeffect.md)\
[IsForceFeedbackMotorPoweredOn](https://docs.xbox.com/pt-BR/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_isforcefeedbackmotorpoweredon.md)\
[SetForceFeedbackMotorGain](https://docs.xbox.com/pt-BR/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_setforcefeedbackmotorgain.md)\
[Force feedback no GameInput](https://docs.xbox.com/pt-BR/build/core-features/common/input/advanced/input-forcefeedback.md)\
[IGameInputDevice](https://docs.xbox.com/pt-BR/reference/input/gameinput/interfaces/igameinputdevice/igameinputdevice.md)

## Histórico de versões

| Versão | Alterações |
| - | - |
| **v4** | Introduzido. |


## Related topics

- [Force feedback no GameInput](https://docs.xbox.com/pt-BR/build/core-features/common/input/advanced/input-forcefeedback.md)
- [IGameInputDevice::GetForceFeedbackMotorInfo](https://docs.xbox.com/pt-BR/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_getforcefeedbackmotorinfo.md)
- [IGameInputForceFeedbackEffect::GetDevice](https://docs.xbox.com/pt-BR/reference/input/gameinput/interfaces/igameinputforcefeedbackeffect/methods/igameinputforcefeedbackeffect_getdevice.md)
- [IGameInputDevice::GetSupportedRumbleMotors](https://docs.xbox.com/pt-BR/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_getsupportedrumblemotors.md)
- [IGameInputDevice::GetInputReportCount](https://docs.xbox.com/pt-BR/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_getinputreportcount.md)
