Handle pointer capture on SOURCE_TOUCHPAD devices

This commit is contained in:
Cameron Gutman
2021-02-27 15:48:37 -06:00
parent 54ebd0a796
commit 20ced841dd
2 changed files with 14 additions and 5 deletions

View File

@@ -1187,6 +1187,7 @@ public class Game extends Activity implements SurfaceHolder.Callback,
{
// This case is for mice and non-finger touch devices
if (event.getSource() == InputDevice.SOURCE_MOUSE ||
event.getSource() == InputDevice.SOURCE_TOUCHPAD ||
event.getSource() == InputDevice.SOURCE_MOUSE_RELATIVE ||
(event.getPointerCount() >= 1 &&
(event.getToolType(0) == MotionEvent.TOOL_TYPE_MOUSE ||