1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-04-02 22:05:43 +02:00

haptic feedback only if menu opens

This commit is contained in:
Michael 2023-07-14 22:47:13 +02:00 committed by GitHub
parent 9ef959a7f8
commit c6e860720e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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