1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-08-13 19:54:17 +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

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;
}
}
}
}