tweak touchUp delay

This commit is contained in:
TrueZhuanjia
2025-12-02 22:09:00 +08:00
parent ad0f3dca30
commit 8c7bf18b65
+2 -1
View File
@@ -151,7 +151,8 @@ import UIKit
eventType = UInt8(LI_TOUCH_EVENT_MOVE)
}
delay = eventType == UInt8(LI_TOUCH_EVENT_UP) ? 0.0086 : 0
delay = manualTick ? 0.0086 : 0.017
delay = eventType == UInt8(LI_TOUCH_EVENT_UP) ? delay : 0
DispatchQueue.global().asyncAfter(deadline: dispatchMoment + tickMoment + delay) {
LiSendPenEvent(eventType, UInt8(LI_TOOL_TYPE_PEN), 0, Float(location.x/videoSize.width), Float(location.y/videoSize.height), Float(touch.force/touch.maximumPossibleForce)/sin(Float(altitude)), 0, 0, self.getRotation(fromAzimuthAngle: Float(azimuth)), self.getTilt(fromAltitudeAngle: Float(altitude)))