IGameInputDevice::SetHapticMotorState (v0)

注意

尚未实现此函数。

向设备上的回馈马达发送波形。

语法

HRESULT SetHapticMotorState(  
         uint32_t motorIndex,  
         const GameInputHapticFeedbackParams* params  
)  

参数

motorIndex _In_
类型:uint32_t

回馈马达设置状态的索引。

params _In_opt_
类型:GameInputHapticFeedbackParams*

在回馈马达上播放的波形的说明。

返回值

类型:HRESULT

返回 E_NOTIMPL

备注

IGameInputDevice::SetHapticMotorState 方法按照 GameInputHapticFeedbackParams 结构指定的方式播放波形:

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

此方法将请求的值存储在共享内存中并向事件对象发出信号。 因此,它会快速返回,并且可安全地从任意上下文中进行调用。 在 GameInputHapticFeedbackParams 结构中传递无效或不受支持的值会导致返回 HRESULT 错误。 有关 GameInput API 的中级和高级用例,请参阅高级 GameInput 主题

要求

头文件:GameInput.h

库:xgameruntime.lib

支持平台:Windows、Xbox One 系列主机和 Xbox Series 主机

另请参阅

GameInput 概述
IGameInputDevice