diff --git a/source-code/source/plugins/TLAC/Components/Input/TouchSliderEmulator.cpp b/source-code/source/plugins/TLAC/Components/Input/TouchSliderEmulator.cpp index 4c7a47a..1e9a340 100644 --- a/source-code/source/plugins/TLAC/Components/Input/TouchSliderEmulator.cpp +++ b/source-code/source/plugins/TLAC/Components/Input/TouchSliderEmulator.cpp @@ -47,6 +47,8 @@ namespace TLAC::Components componentsManager = manager; sliderState = (TouchSliderState*)SLIDER_CTRL_TASK_ADDRESS; + touchSliderEmulatorIsEnabled = true; + LeftSideSlideLeft = new Binding(); LeftSideSlideRight = new Binding(); diff --git a/source-code/source/plugins/TLAC/Components/Input/TouchSliderEmulator.h b/source-code/source/plugins/TLAC/Components/Input/TouchSliderEmulator.h index 126210d..abc437c 100644 --- a/source-code/source/plugins/TLAC/Components/Input/TouchSliderEmulator.h +++ b/source-code/source/plugins/TLAC/Components/Input/TouchSliderEmulator.h @@ -60,5 +60,7 @@ namespace TLAC::Components void ApplyContactPoint(ContactPoint &contactPoint, int section); void ApplyBitfieldState(uint32_t state); }; + + inline bool touchSliderEmulatorIsEnabled = false; } diff --git a/source-code/source/plugins/TLAC/Input/Xinput/Xinput.cpp b/source-code/source/plugins/TLAC/Input/Xinput/Xinput.cpp index 152d9ac..23c9164 100644 --- a/source-code/source/plugins/TLAC/Input/Xinput/Xinput.cpp +++ b/source-code/source/plugins/TLAC/Input/Xinput/Xinput.cpp @@ -252,7 +252,7 @@ namespace TLAC::Input SetTapStates(i, elapsed); } - if (rumble && TLAC::Components::TouchSliderEmulator::LatestInstance->isSliderTouched() && TLAC::Components::TargetInspector::ShouldVibrate) + if (rumble && TLAC::Components::touchSliderEmulatorIsEnabled && TLAC::Components::TouchSliderEmulator::LatestInstance->isSliderTouched() && TLAC::Components::TargetInspector::ShouldVibrate) { XINPUT_VIBRATION vibration; ZeroMemory(&vibration, sizeof(XINPUT_VIBRATION));