From 70b7f992de28e092896ab0ffaee79b59cbf27df2 Mon Sep 17 00:00:00 2001 From: Michael <13953785+Laserlicht@users.noreply.github.com> Date: Sat, 8 Jul 2023 20:34:11 +0200 Subject: [PATCH] fix --- client/eventsSDL/InputSourceTouch.cpp | 3 ++- config/widgets/settings/generalOptionsTab.json | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/client/eventsSDL/InputSourceTouch.cpp b/client/eventsSDL/InputSourceTouch.cpp index 3f7a696c8..314fff09e 100644 --- a/client/eventsSDL/InputSourceTouch.cpp +++ b/client/eventsSDL/InputSourceTouch.cpp @@ -108,6 +108,7 @@ void InputSourceTouch::handleEventFingerDown(const SDL_TouchFingerEvent & tfinge { // FIXME: better place to update potentially changed settings? params.longTouchTimeMilliseconds = settings["general"]["longTouchTimeMilliseconds"].Float(); + params.hapticFeedbackEnabled = settings["general"]["hapticFeedback"].Bool(); lastTapTimeTicks = tfinger.timestamp; @@ -298,7 +299,7 @@ void InputSourceTouch::emitPinchEvent(const SDL_TouchFingerEvent & tfinger) } void InputSourceTouch::hapticFeedback() { - if(hapticFeedbackEnabled) + if(hapticFeedbackEnabled) { #if defined(VCMI_ANDROID) CAndroidVMHelper vmHelper; vmHelper.callStaticVoidMethod(CAndroidVMHelper::NATIVE_METHODS_DEFAULT_CLASS, "hapticFeedback"); diff --git a/config/widgets/settings/generalOptionsTab.json b/config/widgets/settings/generalOptionsTab.json index 27a613039..ae3518c0e 100644 --- a/config/widgets/settings/generalOptionsTab.json +++ b/config/widgets/settings/generalOptionsTab.json @@ -60,7 +60,7 @@ }, { "text": "vcmi.systemOptions.hapticFeedbackButton.hover", - "created" : "touchscreen" + "created" : "mobile" } ] },