From 0cb4c31d1eb04c1e5dcef0a664110bf2eff9aa62 Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Mon, 20 Oct 2014 02:49:38 -0400 Subject: [PATCH] Improve touch input support --- Limelight/StreamView.m | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Limelight/StreamView.m b/Limelight/StreamView.m index 9905d0c..120ff3d 100644 --- a/Limelight/StreamView.m +++ b/Limelight/StreamView.m @@ -26,9 +26,7 @@ UITouch *touch = [[event allTouches] anyObject]; CGPoint currentLocation = [touch locationInView:self]; - NSLog(@"Touch move"); - - if (touchLocation.x != currentLocation.x && + if (touchLocation.x != currentLocation.x || touchLocation.y != currentLocation.y) { LiSendMouseMoveEvent(touchLocation.x - currentLocation.x, @@ -43,9 +41,12 @@ NSLog(@"Touch up"); if (!touchMoved) { + NSLog(@"Sending left mouse button press"); + LiSendMouseButtonEvent(BUTTON_ACTION_PRESS, BUTTON_LEFT); - usleep(50 * 1000); + // Wait 100 ms to simulate a real button press + usleep(100 * 1000); LiSendMouseButtonEvent(BUTTON_ACTION_RELEASE, BUTTON_LEFT); }