1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-05-23 22:40:07 +02:00
This commit is contained in:
Michael 2023-07-08 20:34:11 +02:00 committed by GitHub
parent 06541211d5
commit 70b7f992de
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions
client/eventsSDL
config/widgets/settings

@ -108,6 +108,7 @@ void InputSourceTouch::handleEventFingerDown(const SDL_TouchFingerEvent & tfinge
{ {
// FIXME: better place to update potentially changed settings? // FIXME: better place to update potentially changed settings?
params.longTouchTimeMilliseconds = settings["general"]["longTouchTimeMilliseconds"].Float(); params.longTouchTimeMilliseconds = settings["general"]["longTouchTimeMilliseconds"].Float();
params.hapticFeedbackEnabled = settings["general"]["hapticFeedback"].Bool();
lastTapTimeTicks = tfinger.timestamp; lastTapTimeTicks = tfinger.timestamp;
@ -298,7 +299,7 @@ void InputSourceTouch::emitPinchEvent(const SDL_TouchFingerEvent & tfinger)
} }
void InputSourceTouch::hapticFeedback() { void InputSourceTouch::hapticFeedback() {
if(hapticFeedbackEnabled) if(hapticFeedbackEnabled) {
#if defined(VCMI_ANDROID) #if defined(VCMI_ANDROID)
CAndroidVMHelper vmHelper; CAndroidVMHelper vmHelper;
vmHelper.callStaticVoidMethod(CAndroidVMHelper::NATIVE_METHODS_DEFAULT_CLASS, "hapticFeedback"); vmHelper.callStaticVoidMethod(CAndroidVMHelper::NATIVE_METHODS_DEFAULT_CLASS, "hapticFeedback");

@ -60,7 +60,7 @@
}, },
{ {
"text": "vcmi.systemOptions.hapticFeedbackButton.hover", "text": "vcmi.systemOptions.hapticFeedbackButton.hover",
"created" : "touchscreen" "created" : "mobile"
} }
] ]
}, },