Fix recognition of mouse events on Shield Portable

This commit is contained in:
Cameron Gutman 2016-01-30 04:15:09 -05:00
parent 2b452e51f9
commit a455e75e37

View File

@ -616,7 +616,9 @@ public class Game extends Activity implements SurfaceHolder.Callback,
else if ((event.getSource() & InputDevice.SOURCE_CLASS_POINTER) != 0) else if ((event.getSource() & InputDevice.SOURCE_CLASS_POINTER) != 0)
{ {
// This case is for mice // This case is for mice
if (event.getSource() == InputDevice.SOURCE_MOUSE) if (event.getSource() == InputDevice.SOURCE_MOUSE ||
(event.getPointerCount() >= 1 &&
event.getToolType(0) == MotionEvent.TOOL_TYPE_MOUSE))
{ {
int changedButtons = event.getButtonState() ^ lastButtonState; int changedButtons = event.getButtonState() ^ lastButtonState;