From e741f83c0686373f4bcac6996a897243f5c7d046 Mon Sep 17 00:00:00 2001 From: True Zhuanjia Date: Mon, 26 Aug 2024 21:29:10 +0800 Subject: [PATCH] urgent fix: native touch pointer sensitivity tweak not working --- Limelight/Input/NativeTouchHandler.m | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Limelight/Input/NativeTouchHandler.m b/Limelight/Input/NativeTouchHandler.m index eda51be2..b8b70810 100644 --- a/Limelight/Input/NativeTouchHandler.m +++ b/Limelight/Input/NativeTouchHandler.m @@ -102,10 +102,12 @@ CGPoint targetCoords; uint8_t pointerId = [self retrievePointerIdFromDict:touch]; // NSLog(@"excluded count: %d", (uint32_t)[excludedPointerIds count]); - if(activateCoordSelector && touch.phase == UITouchPhaseMoved) targetCoords = [NativeTouchPointer selectCoordsFor:touch]; // coordinates of touch pointer replaced to relative ones here. if([excludedPointerIds containsObject:@(pointerId)]) return; // if the pointerId has been excluded by edge check, we're done here. this touch event will not be sent to the remote PC. and this must be checked after coord selector finishes populating new relative coords, or the app will crash! + + if(activateCoordSelector && touch.phase == UITouchPhaseMoved) targetCoords = [NativeTouchPointer selectCoordsFor:touch]; // coordinates of touch pointer replaced to relative ones here. else targetCoords = [touch locationInView:streamView]; + CGPoint location = [streamView adjustCoordinatesForVideoArea:targetCoords]; CGSize videoSize = [streamView getVideoAreaSize]; CGFloat normalizedX = location.x / videoSize.width;