IGameInputDevice::SetHapticMotorState

Note

This function is not yet implemented.

Sends a waveform to a haptic motor on a device.

Syntax

HRESULT SetHapticMotorState(  
         uint32_t motorIndex,  
         const GameInputHapticFeedbackParams* params  
)  

Parameters

motorIndex   _In_
Type: uint32_t

Index of the haptic motor set state.

params   _In_opt_
Type: GameInputHapticFeedbackParams*

Description of the waveform that is played on the haptic motor.

Return value

Type: HRESULT

Returns E_NOTIMPL.

Remarks

The IGameInputDevice::SetHapticMotorState method plays a waveform as specified by a GameInputHapticFeedbackParams structure:

typedef struct GameInputHapticFeedbackParams
{
    GameInputHapticWaveformInfo * waveform;
    uint64_t duration;
    float intensity;
    uint32_t playCount;
    uint64_t repeatDelay;
} GameInputHapticFeedbackParams;

This method stores the requested values in shared memory and signals an event object. It therefore returns quickly and is safe to call from any context. Passing invalid or unsupported values in the GameInputHapticFeedbackParams structure results in an error HRESULT returned. For intermediate and advanced use-cases of the GameInput API, see Advanced GameInput topics.

Requirements

Header: GameInput.h

Library: xgameruntime.lib

Supported platforms: Windows, Xbox One family consoles and Xbox Series consoles

See also

Overview of GameInput
IGameInputDevice