mirror of
https://github.com/moonlight-stream/moonlight-qt.git
synced 2026-11-28 16:54:20 +00:00
Clear haptic effect ID after destroying it
This commit is contained in:
1 parent
9fa8b15642
commit
bae838eeb9
1 file changed
+1
@@ -862,6 +862,7 @@ void SdlInputHandler::rumble(unsigned short controllerNumber, unsigned short low
|
||||
if (m_GamepadState[controllerNumber].hapticMethod == GAMEPAD_HAPTIC_METHOD_LEFTRIGHT) {
|
||||
if (m_GamepadState[controllerNumber].hapticEffectId >= 0) {
|
||||
SDL_HapticDestroyEffect(haptic, m_GamepadState[controllerNumber].hapticEffectId);
|
||||
m_GamepadState[controllerNumber].hapticEffectId = -1;
|
||||
}
|
||||
} else if (m_GamepadState[controllerNumber].hapticMethod == GAMEPAD_HAPTIC_METHOD_SIMPLERUMBLE) {
|
||||
SDL_HapticRumbleStop(haptic);
|
||||
|
||||
Reference in new issue
Block a user