From d513e4e60690a4ca1a2ea866a3e8622f078daef0 Mon Sep 17 00:00:00 2001 From: Aaron M Date: Mon, 28 Oct 2019 18:07:42 +1300 Subject: [PATCH] Revert "Removed stop previous effect if not completed" This reverts commit 268d215366f0beada2a946d32dba717ac11b4a36. --- DllMain.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/DllMain.cpp b/DllMain.cpp index d17e22a..6578ae8 100644 --- a/DllMain.cpp +++ b/DllMain.cpp @@ -1092,6 +1092,11 @@ void TriggerConstantEffect(int direction, double strength) return; } + // stop previous effect if not completed + if (configResetFeedback) { + SDL_HapticStopEffect(haptic, effects.effect_constant_id); + } + SDL_HapticEffect tempEffect; SDL_memset(&tempEffect, 0, sizeof(SDL_HapticEffect)); tempEffect.type = SDL_HAPTIC_CONSTANT;