From c5fc72cc2c197e14faf2ec684fa301513dc510ea Mon Sep 17 00:00:00 2001 From: TrueZhuanjia Date: Sat, 9 Aug 2025 22:14:16 +0800 Subject: [PATCH] make double tap dragging easier to trigger on iPhone --- VoidLink/Input/OnScreenWidgetView.swift | 4 ++-- VoidLink/Input/RelativeTouchHandler.m | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/VoidLink/Input/OnScreenWidgetView.swift b/VoidLink/Input/OnScreenWidgetView.swift index fd1694ad..47652eae 100644 --- a/VoidLink/Input/OnScreenWidgetView.swift +++ b/VoidLink/Input/OnScreenWidgetView.swift @@ -1214,11 +1214,11 @@ import UIKit if widget.capturedTouches.contains(touch) || !widget.isSlidable {continue} widget.capturedTouches.add(touch) widget.handleButtonDown() - print("UIButton: \(widget.buttonLabel) in, \(widget.touchPadString), \(CACurrentMediaTime())") + // print("UIButton: \(widget.buttonLabel) in, \(widget.touchPadString), \(CACurrentMediaTime())") } else{ if !widget.capturedTouches.contains(touch) || !widget.isSlidable {continue} - print("UIButton: \(widget.buttonLabel) out test, \(widget.touchPadString), \(CACurrentMediaTime())") + // print("UIButton: \(widget.buttonLabel) out test, \(widget.touchPadString), \(CACurrentMediaTime())") widget.capturedTouches.remove(touch) widget.handlebuttonUp() } diff --git a/VoidLink/Input/RelativeTouchHandler.m b/VoidLink/Input/RelativeTouchHandler.m index 46a2d932..d6983319 100644 --- a/VoidLink/Input/RelativeTouchHandler.m +++ b/VoidLink/Input/RelativeTouchHandler.m @@ -127,7 +127,7 @@ static const float QUICK_TAP_TIME_INTERVAL = 0.2; }*/ - (BOOL)isAdjacentTouches:(CGPoint)currentPoint from:(CGPoint)originalPoint { - return hypotf(originalPoint.x - currentPoint.x, originalPoint.y - currentPoint.y) <= 100; + return hypotf(originalPoint.x - currentPoint.x, originalPoint.y - currentPoint.y) <= 300; }