From 90a1e68c68d92db32bef28580206f71a10d1626c Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Fri, 2 Jun 2017 18:17:18 -0700 Subject: [PATCH] Move input capture check to not mask touch events --- app/src/main/java/com/limelight/Game.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/app/src/main/java/com/limelight/Game.java b/app/src/main/java/com/limelight/Game.java index ae931630..5e15d04f 100644 --- a/app/src/main/java/com/limelight/Game.java +++ b/app/src/main/java/com/limelight/Game.java @@ -688,11 +688,6 @@ public class Game extends Activity implements SurfaceHolder.Callback, else if ((event.getSource() & InputDevice.SOURCE_CLASS_POINTER) != 0 || event.getSource() == InputDevice.SOURCE_MOUSE_RELATIVE) { - // Ignore mouse input if we're not capturing from our input source - if (!inputCaptureProvider.isCapturing()) { - return false; - } - // This case is for mice if (event.getSource() == InputDevice.SOURCE_MOUSE || (event.getPointerCount() >= 1 && @@ -700,6 +695,11 @@ public class Game extends Activity implements SurfaceHolder.Callback, { int changedButtons = event.getButtonState() ^ lastButtonState; + // Ignore mouse input if we're not capturing from our input source + if (!inputCaptureProvider.isCapturing()) { + return false; + } + if (event.getActionMasked() == MotionEvent.ACTION_SCROLL) { // Send the vertical scroll packet byte vScrollClicks = (byte) event.getAxisValue(MotionEvent.AXIS_VSCROLL);