> ## 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.

# XINPUT_VIBRATION_EX

> XINPUT_VIBRATION_EX

# XINPUT\_VIBRATION\_EX

描述四电机控制器振动功能的电机速度。

## 语法

```cpp theme={null}
typedef struct XINPUT_VIBRATION_EX {  
    WORD wLeftMotorSpeed;  
    WORD wRightMotorSpeed;  
    WORD wLeftTriggerSpeed;  
    WORD wRightTriggerSpeed;  
} XINPUT_VIBRATION_EX  
```

### 成员

*wLeftMotorSpeed*\
类型：WORD

左电机的速度。有效值范围为 0 到 65535。零表示完全不使用该电机，65535 表示该电机以 100% 使用。

*wRightMotorSpeed*\
类型：WORD

右电机的速度。有效值范围为 0 到 65535。零表示完全不使用该电机，65535 表示该电机以 100% 使用。

*wLeftTriggerSpeed*\
类型：WORD

左扳机电机的速度。有效值范围为 0 到 65535。零表示完全不使用该电机，65535 表示该电机以 100% 使用。

*wRightTriggerSpeed*\
类型：WORD

右扳机电机的速度。有效值范围为 0 到 65535。零表示完全不使用该电机，65535 表示该电机以 100% 使用。

## 备注

左电机是低频震动电机。右电机是高频震动电机。这两个电机并不相同，会产生不同的振动效果。

两个扳机电机通过扳机提供触觉反馈。

此结构由 [XInputSetStateEx](https://docs.xbox.com/zh-CN/reference/input/xinputongameinput/functions/xinputsetstateex.md) 函数使用。

有关详细信息，请参阅 [XInputOnGameInput 包装器](https://docs.xbox.com/zh-CN/build/core-features/common/input/porting/input-porting-xinput.md#xinputWrapperSection)。

## 要求

**头文件：** XInputOnGameInput.h

**支持的平台：** XBOX One 系列主机和 XBOX Series 主机

## 另请参阅

[XInputSetState](https://docs.xbox.com/zh-CN/reference/input/xinputongameinput/functions/xinputsetstate.md)\
[从 XInput 移植到 GameInput](https://docs.xbox.com/zh-CN/build/core-features/common/input/porting/input-porting-xinput.md)\
[XInputOnGameInput](https://docs.xbox.com/zh-CN/reference/input/xinputongameinput/xinputongameinput_members.md)


## Related topics

- [XInputSetStateEx](https://docs.xbox.com/zh-CN/reference/input/xinputongameinput/functions/xinputsetstateex.md)
- [XInputOnGameInput（API 内容）](https://docs.xbox.com/zh-CN/reference/input/xinputongameinput/xinputongameinput_members.md)
- [XINPUT_VIBRATION](https://docs.xbox.com/zh-CN/reference/input/xinputongameinput/structs/xinput_vibration.md)
- [XInputSetState](https://docs.xbox.com/zh-CN/reference/input/xinputongameinput/functions/xinputsetstate.md)
- [XINPUT_CAPABILITIES](https://docs.xbox.com/zh-CN/reference/input/xinputongameinput/structs/xinput_capabilities.md)
