1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-01-16 02:47:36 +02:00

Merge pull request #2332 from Laserlicht/patch-3

haptic feedback only if menu opens
This commit is contained in:
Ivan Savenko 2023-07-15 19:46:16 +03:00 committed by GitHub
commit 8e76c8f5c5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -223,10 +223,12 @@ void InputSourceTouch::handleUpdate()
if (currentTime > lastTapTimeTicks + params.longTouchTimeMilliseconds)
{
GH.events().dispatchShowPopup(GH.getCursorPosition());
hapticFeedback();
if (GH.windows().isTopWindowPopup())
{
hapticFeedback();
state = TouchState::TAP_DOWN_LONG;
}
}
}
}