diff --git a/app/src/main/java/com/limelight/binding/input/touch/AbsoluteTouchContext.java b/app/src/main/java/com/limelight/binding/input/touch/AbsoluteTouchContext.java index df4b4bb2..f1c5112a 100644 --- a/app/src/main/java/com/limelight/binding/input/touch/AbsoluteTouchContext.java +++ b/app/src/main/java/com/limelight/binding/input/touch/AbsoluteTouchContext.java @@ -23,13 +23,12 @@ public class AbsoluteTouchContext implements TouchContext { private boolean confirmedTap; private Timer longPressTimer; private Timer tapDownTimer; - private float accumulatedScrollDelta; private final NvConnection conn; private final int actionIndex; private final View targetView; - private static final int SCROLL_SPEED_DIVISOR = 20; + private static final int SCROLL_SPEED_FACTOR = 3; private static final int LONG_PRESS_TIME_THRESHOLD = 650; private static final int LONG_PRESS_DISTANCE_THRESHOLD = 30; @@ -65,7 +64,6 @@ public class AbsoluteTouchContext implements TouchContext { lastTouchLocationY = lastTouchDownY = eventY; lastTouchDownTime = SystemClock.uptimeMillis(); cancelled = confirmedTap = confirmedLongPress = false; - accumulatedScrollDelta = 0; if (actionIndex == 0) { // Start the timers @@ -228,11 +226,7 @@ public class AbsoluteTouchContext implements TouchContext { } } else if (actionIndex == 1) { - accumulatedScrollDelta += (eventY - lastTouchLocationY) / (float)SCROLL_SPEED_DIVISOR; - if ((short)accumulatedScrollDelta != 0) { - conn.sendMouseHighResScroll((short)accumulatedScrollDelta); - accumulatedScrollDelta -= (short)accumulatedScrollDelta; - } + conn.sendMouseHighResScroll((short)((eventY - lastTouchLocationY) * SCROLL_SPEED_FACTOR)); } lastTouchLocationX = eventX; diff --git a/app/src/main/java/com/limelight/binding/input/touch/RelativeTouchContext.java b/app/src/main/java/com/limelight/binding/input/touch/RelativeTouchContext.java index 794f2e68..b6763815 100644 --- a/app/src/main/java/com/limelight/binding/input/touch/RelativeTouchContext.java +++ b/app/src/main/java/com/limelight/binding/input/touch/RelativeTouchContext.java @@ -36,7 +36,7 @@ public class RelativeTouchContext implements TouchContext { private static final int TAP_TIME_THRESHOLD = 250; private static final int DRAG_TIME_THRESHOLD = 650; - private static final int SCROLL_SPEED_DIVISOR = 20; + private static final int SCROLL_SPEED_FACTOR = 5; public RelativeTouchContext(NvConnection conn, int actionIndex, int referenceWidth, int referenceHeight, View view) @@ -248,9 +248,7 @@ public class RelativeTouchContext implements TouchContext { if (pointerCount == 2) { if (confirmedScroll) { - deltaY /= SCROLL_SPEED_DIVISOR; - - conn.sendMouseHighResScroll((short) deltaY); + conn.sendMouseHighResScroll((short)(deltaY * SCROLL_SPEED_FACTOR)); } } else { conn.sendMouseMove((short) deltaX, (short) deltaY); diff --git a/app/src/main/jni/moonlight-core/moonlight-common-c b/app/src/main/jni/moonlight-core/moonlight-common-c index a290ec03..6001ece0 160000 --- a/app/src/main/jni/moonlight-core/moonlight-common-c +++ b/app/src/main/jni/moonlight-core/moonlight-common-c @@ -1 +1 @@ -Subproject commit a290ec032b6a068a56461bbe4b60798b68a319d5 +Subproject commit 6001ece0b8bfcea6a8122a3e56f48f515e1aaaf5