> ## Documentation Index
> Fetch the complete documentation index at: https://devdocs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# XINPUT_VIBRATION

> XINPUT_VIBRATION

# XINPUT\_VIBRATION

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

<a id="syntaxSection" />

## 语法

```cpp theme={null}
typedef struct XINPUT_VIBRATION {  
    WORD wLeftMotorSpeed;  
    WORD wRightMotorSpeed;  
} XINPUT_VIBRATION  
```

<a id="membersSection" />

### 成员

*wLeftMotorSpeed*\
类型：WORD

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

*wRightMotorSpeed*\
类型：WORD

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

<a id="remarksSection" />

## 备注

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

此结构由 [XInputSetState](/reference/input/xinputongameinput/functions/xinputsetstate) 函数使用。

有关详细信息，请参阅 [XInputOnGameInput 包装器](/build/core-features/common/input/porting/input-porting-xinput#xinputWrapperSection)。

<a id="requirementsSection" />

## 要求

**头文件：** XInputOnGameInput.h

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

<a id="seealsoSection" />

## 另请参阅

[XInputSetStateEx](/reference/input/xinputongameinput/functions/xinputsetstateex)\
[从 XInput 移植到 GameInput](/build/core-features/common/input/porting/input-porting-xinput)\
[XInputOnGameInput](/reference/input/xinputongameinput/xinputongameinput_members)


## Related topics

- [XInputSetState](/zh-CN/reference/input/xinputongameinput/functions/xinputsetstate.md)
- [XInputOnGameInput](/zh-CN/reference/input/xinputongameinput/xinputongameinput_members.md)
- [XINPUT_CAPABILITIES](/zh-CN/reference/input/xinputongameinput/structs/xinput_capabilities.md)
- [XINPUT_VIBRATION_EX](/zh-CN/reference/input/xinputongameinput/structs/xinput_vibration_ex.md)
- [XInputSetStateEx](/zh-CN/reference/input/xinputongameinput/functions/xinputsetstateex.md)
