mirror of
https://github.com/vcmi/vcmi.git
synced 2024-11-28 08:48:48 +02:00
fix
This commit is contained in:
parent
7321bb1d25
commit
71659f1423
@ -181,15 +181,15 @@ void InputSourceTouch::handleEventFingerUp(const SDL_TouchFingerEvent & tfinger)
|
||||
case TouchState::TAP_DOWN_SHORT:
|
||||
{
|
||||
GH.input().setCursorPosition(convertTouchToMouse(tfinger));
|
||||
if(tfinger.timestamp - lastLeftClickTimeTicks < doubleTouchTimeMilliseconds && (convertTouchToMouse(tfinger) - lastLeftClickPosition).distance < doubleTouchToleranceDistance)
|
||||
GH.events().dispatchMouseDoubleClick(convertTouchToMouse(tfinger);
|
||||
if(tfinger.timestamp - lastLeftClickTimeTicks < params.doubleTouchTimeMilliseconds && (convertTouchToMouse(tfinger) - lastLeftClickPosition).length() < params.doubleTouchToleranceDistance)
|
||||
GH.events().dispatchMouseDoubleClick(convertTouchToMouse(tfinger));
|
||||
else
|
||||
{
|
||||
GH.events().dispatchMouseLeftButtonPressed(convertTouchToMouse(tfinger), params.touchToleranceDistance);
|
||||
GH.events().dispatchMouseLeftButtonReleased(convertTouchToMouse(tfinger), params.touchToleranceDistance);
|
||||
lastLeftClickTimeTicks = tfinger.timestamp;
|
||||
lastLeftClickPosition = convertTouchToMouse(tfinger);
|
||||
}
|
||||
lastLeftClickTimeTicks = tfinger.timestamp;
|
||||
lastLeftClickPosition = convertTouchToMouse(tfinger);
|
||||
state = TouchState::IDLE;
|
||||
break;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user