From a43fe609d37136f17d975999619ea918e4f957c0 Mon Sep 17 00:00:00 2001 From: TrueZhuangjia Date: Fri, 4 Apr 2025 16:39:00 +0800 Subject: [PATCH] tweak qos for async native touch --- Limelight/Input/NativeTouchHandler.m | 4 ++-- Limelight/Input/PureNativeTouchHandler.m | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Limelight/Input/NativeTouchHandler.m b/Limelight/Input/NativeTouchHandler.m index af593a2b..5781a8ef 100644 --- a/Limelight/Input/NativeTouchHandler.m +++ b/Limelight/Input/NativeTouchHandler.m @@ -208,7 +208,7 @@ } - (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event { - if (asyncNativeTouch) dispatch_async(dispatch_get_global_queue(QOS_CLASS_USER_INTERACTIVE, 0), ^{ + if (asyncNativeTouch) dispatch_async(dispatch_get_global_queue(QOS_CLASS_USER_INITIATED, 0), ^{ for (UITouch* touch in touches){ // continue to the next loop if current touch is already captured by OSC. works only in regular native touch if([OnScreenControls.touchAddrsCapturedByOnScreenControls containsObject:@((uintptr_t)touch)]) continue; @@ -232,7 +232,7 @@ - (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event { - if(asyncNativeTouch) dispatch_async(dispatch_get_global_queue(QOS_CLASS_USER_INTERACTIVE, 0), ^{ + if(asyncNativeTouch) dispatch_async(dispatch_get_global_queue(QOS_CLASS_USER_INITIATED, 0), ^{ for (UITouch* touch in touches){ // continue to the next loop if current touch is already captured by OSC. works only in regular native touch if([OnScreenControls.touchAddrsCapturedByOnScreenControls containsObject:@((uintptr_t)touch)]) continue; diff --git a/Limelight/Input/PureNativeTouchHandler.m b/Limelight/Input/PureNativeTouchHandler.m index c789060b..e04eb701 100644 --- a/Limelight/Input/PureNativeTouchHandler.m +++ b/Limelight/Input/PureNativeTouchHandler.m @@ -203,7 +203,7 @@ } - (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event { - if (asyncNativeTouch) dispatch_async(dispatch_get_global_queue(QOS_CLASS_USER_INTERACTIVE, 0), ^{ + if (asyncNativeTouch) dispatch_async(dispatch_get_global_queue(QOS_CLASS_USER_INITIATED, 0), ^{ for (UITouch* touch in touches){ if(self->activateCoordSelector) [self updatePointerObjInDict:touch]; [self sendTouchEvent:touch withTouchtype:LI_TOUCH_EVENT_MOVE]; @@ -223,7 +223,7 @@ - (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event { - if(asyncNativeTouch) dispatch_async(dispatch_get_global_queue(QOS_CLASS_USER_INTERACTIVE, 0), ^{ + if(asyncNativeTouch) dispatch_async(dispatch_get_global_queue(QOS_CLASS_USER_INITIATED, 0), ^{ for (UITouch* touch in touches){ [self sendTouchEvent:touch withTouchtype:LI_TOUCH_EVENT_UP]; //send touch event before remove pointerId [self removePointerId:touch]; //then remove pointerId