mirror of
https://github.com/moonlight-stream/moonlight-ios.git
synced 2026-04-24 01:06:53 +00:00
Tweaks to dragging behavior to match Moonlight Android
This commit is contained in:
@@ -53,7 +53,7 @@
|
|||||||
touchLocation = [touch locationInView:self];
|
touchLocation = [touch locationInView:self];
|
||||||
touchMoved = false;
|
touchMoved = false;
|
||||||
if ([[event allTouches] count] == 1 && !isDragging) {
|
if ([[event allTouches] count] == 1 && !isDragging) {
|
||||||
dragTimer = [NSTimer scheduledTimerWithTimeInterval:1.0
|
dragTimer = [NSTimer scheduledTimerWithTimeInterval:0.650
|
||||||
target:self
|
target:self
|
||||||
selector:@selector(onDragStart:)
|
selector:@selector(onDragStart:)
|
||||||
userInfo:nil
|
userInfo:nil
|
||||||
@@ -122,8 +122,6 @@
|
|||||||
usleep(100 * 1000);
|
usleep(100 * 1000);
|
||||||
|
|
||||||
LiSendMouseButtonEvent(BUTTON_ACTION_RELEASE, BUTTON_RIGHT);
|
LiSendMouseButtonEvent(BUTTON_ACTION_RELEASE, BUTTON_RIGHT);
|
||||||
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
if (!isDragging){
|
if (!isDragging){
|
||||||
Log(LOG_D, @"Sending left mouse button press");
|
Log(LOG_D, @"Sending left mouse button press");
|
||||||
@@ -137,6 +135,10 @@
|
|||||||
LiSendMouseButtonEvent(BUTTON_ACTION_RELEASE, BUTTON_LEFT);
|
LiSendMouseButtonEvent(BUTTON_ACTION_RELEASE, BUTTON_LEFT);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if (isDragging) {
|
||||||
|
isDragging = false;
|
||||||
|
LiSendMouseButtonEvent(BUTTON_ACTION_RELEASE, BUTTON_LEFT);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user