> ## 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::SetHapticMotorState (déconseillé)

> IGameInputDevice::SetHapticMotorState

# IGameInputDevice::SetHapticMotorState

> [!WARNING]
>
> **Obsolète.** Cette méthode a été supprimée dans GameInput v1 et n'est pas disponible dans l'API actuelle.

Définit l'état du moteur haptique spécifié sur l'appareil.

## Syntaxe

```cpp theme={null}
HRESULT SetHapticMotorState(
    uint32_t motorIndex,
    const GameInputHapticFeedbackParams* params
);
```

### Paramètres

*motorIndex*   \_In\_\
Type : uint32\_t

Index de base zéro du moteur haptique à définir.

*params*   \_In\_\
Type : const [GameInputHapticFeedbackParams](https://docs.xbox.com/fr/reference/input/gameinput/deprecated/structs/gameinputhapticfeedbackparams.md)\*

Pointeur vers une structure [GameInputHapticFeedbackParams](https://docs.xbox.com/fr/reference/input/gameinput/deprecated/structs/gameinputhapticfeedbackparams.md) décrivant l'effet haptique à lire.

### Valeur de retour

Type : HRESULT

Retourne E\_NOTIMPL, car cette méthode n'a jamais été implémentée dans v0.

## Remarques

Cette méthode a été supprimée dans v1, de même que la structure [GameInputHapticFeedbackParams](https://docs.xbox.com/fr/reference/input/gameinput/deprecated/structs/gameinputhapticfeedbackparams.md). Dans l'API actuelle, le retour haptique est contrôlé via [IGameInputDevice::SetForceFeedbackMotorGain](https://docs.xbox.com/fr/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_setforcefeedbackmotorgain.md) et [IGameInputForceFeedbackEffect](https://docs.xbox.com/fr/reference/input/gameinput/interfaces/igameinputforcefeedbackeffect/igameinputforcefeedbackeffect.md).

## Historique des versions

| Version | Modifications |
| - | - |
| **v1** | Supprimé. |
| **v0** | Introduit. |

## Voir aussi

[Membres obsolètes de l'API GameInput](https://docs.xbox.com/fr/reference/input/gameinput/deprecated/gameinput_deprecated_members.md)\
[GameInputHapticFeedbackParams](https://docs.xbox.com/fr/reference/input/gameinput/deprecated/structs/gameinputhapticfeedbackparams.md)\
[IGameInputDevice](https://docs.xbox.com/fr/reference/input/gameinput/interfaces/igameinputdevice/igameinputdevice.md)


## Related topics

- [IGameInputDevice::SetInputSynchronizationState (déconseillé)](https://docs.xbox.com/fr/reference/input/gameinput/deprecated/interfaces/igameinputdevice/methods/igameinputdevice_setinputsynchronizationstate.md)
- [IGameInputDevice::GetBatteryState (déconseillé)](https://docs.xbox.com/fr/reference/input/gameinput/deprecated/interfaces/igameinputdevice/methods/igameinputdevice_getbatterystate.md)
- [IGameInputDevice::SetRawDeviceFeature (déconseillé)](https://docs.xbox.com/fr/reference/input/gameinput/deprecated/interfaces/igameinputdevice/methods/igameinputdevice_setrawdevicefeature.md)
- [SetForceFeedbackMotorGain](https://docs.xbox.com/fr/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_setforcefeedbackmotorgain.md)
- [GameInputHapticFeedbackParams (déconseillé)](https://docs.xbox.com/fr/reference/input/gameinput/deprecated/structs/gameinputhapticfeedbackparams.md)
