This commit is contained in:
Nikita Leonidov 2020-04-18 19:33:01 -04:00
parent 8fe5ce9335
commit 4d5062d654
2 changed files with 4 additions and 4 deletions

4
deps/mingw/xinput.h vendored
View File

@ -182,8 +182,8 @@ typedef struct _XINPUT_STATE {
*/
typedef struct _XINPUT_VIBRATION {
WORD wLeftMotorIntensity;
WORD wRightMotorIntensity;
WORD wLeftMotorSpeed;
WORD wRightMotorSpeed;
} XINPUT_VIBRATION, *PXINPUT_VIBRATION;
/*

View File

@ -761,8 +761,8 @@ int _glfwPlatformSetJoystickRumble(_GLFWjoystick* js, float slowMotorIntensity,
XINPUT_VIBRATION effect;
ZeroMemory(&effect, sizeof(XINPUT_VIBRATION));
effect.wLeftMotorIntensity = (WORD)(65535.0f * slowMotorIntensity);
effect.wRightMotorIntensity = (WORD)(65535.0f * fastMotorIntensity);
effect.wLeftMotorSpeed = (WORD)(65535.0f * slowMotorIntensity);
effect.wRightMotorSpeed = (WORD)(65535.0f * fastMotorIntensity);
return (int) (XInputSetState(js->win32.index, &effect) == ERROR_SUCCESS);
}