1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-03-25 21:38:59 +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)
{
GH.events().dispatchShowPopup(GH.getCursorPosition());
hapticFeedback();
if (GH.windows().isTopWindowPopup())
hapticFeedback();
state = TouchState::TAP_DOWN_LONG;
}
}