Simplify border detection in native touch modes

This commit is contained in:
True Zhuanjia committed 2024-08-29 01:15:37 +08:00
1 parent cb034b96a4
commit 2b5a1c0551
6 files changed
+201 -21

No files matched your search

+1 -1
View File
@@ -110,7 +110,7 @@ static StreamView* _streamView;
+ (CGPoint)selectCoordsFor:(UITouch *)touch{
NativeTouchPointer *pointer = [pointerObjDict objectForKey:@((uintptr_t)touch)];
if(pointer == nil) return CGPointMake(0, 0); // THIS will PREVENT CRASH caused by slide gesture!
if(pointer == nil) return CGPointMake(0, 0);
if((pointer -> initialPoint).x > pointerVelocityDividerLocationByPoints){ //if first contact coords locates on the right side of divider.
pointer -> useRelativeCoords = true;
return pointer->latestRelativePoint;