Browse Source

Merge pull request #2332 from Laserlicht/patch-3

haptic feedback only if menu opens
Ivan Savenko 2 years ago
parent
commit
8e76c8f5c5
1 changed files with 3 additions and 1 deletions
  1. 3 1
      client/eventsSDL/InputSourceTouch.cpp

+ 3 - 1
client/eventsSDL/InputSourceTouch.cpp

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