From ca2a6c11a194598d3bc9a3610960f9f3531aba0e Mon Sep 17 00:00:00 2001 From: Nikita Date: Sat, 18 Apr 2020 23:43:00 -0400 Subject: [PATCH] fix mixed declarations error in win32_joystick.c --- src/win32_joystick.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/win32_joystick.c b/src/win32_joystick.c index 62b78f560..ae9490dd9 100644 --- a/src/win32_joystick.c +++ b/src/win32_joystick.c @@ -755,10 +755,11 @@ void _glfwPlatformUpdateGamepadGUID(char* guid) int _glfwPlatformSetJoystickRumble(_GLFWjoystick* js, float slowMotorIntensity, float fastMotorIntensity) { + XINPUT_VIBRATION effect; + if (js->win32.device) return GLFW_FALSE; - XINPUT_VIBRATION effect; ZeroMemory(&effect, sizeof(XINPUT_VIBRATION)); effect.wLeftMotorSpeed = (WORD)(65535.0f * slowMotorIntensity);