mirror of
https://github.com/moonlight-stream/moonlight-android.git
synced 2025-07-20 11:33:06 +00:00
Merge branch 'master' into root
This commit is contained in:
commit
247a19766c
@ -553,15 +553,6 @@ public class Game extends Activity implements SurfaceHolder.Callback,
|
|||||||
touchContextMap[i].touchMoveEvent(eventX, eventY);
|
touchContextMap[i].touchMoveEvent(eventX, eventY);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case MotionEvent.ACTION_HOVER_MOVE:
|
|
||||||
// Send a mouse move update (if neccessary)
|
|
||||||
updateMousePosition((int)event.getX(), (int)event.getY());
|
|
||||||
break;
|
|
||||||
case MotionEvent.ACTION_SCROLL:
|
|
||||||
// Send the vertical scroll packet
|
|
||||||
byte vScrollClicks = (byte) event.getAxisValue(MotionEvent.AXIS_VSCROLL);
|
|
||||||
conn.sendMouseScroll(vScrollClicks);
|
|
||||||
break;
|
|
||||||
default:
|
default:
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -570,6 +561,12 @@ public class Game extends Activity implements SurfaceHolder.Callback,
|
|||||||
else if (event.getSource() == InputDevice.SOURCE_MOUSE)
|
else if (event.getSource() == InputDevice.SOURCE_MOUSE)
|
||||||
{
|
{
|
||||||
int changedButtons = event.getButtonState() ^ lastButtonState;
|
int changedButtons = event.getButtonState() ^ lastButtonState;
|
||||||
|
|
||||||
|
if (event.getActionMasked() == MotionEvent.ACTION_SCROLL) {
|
||||||
|
// Send the vertical scroll packet
|
||||||
|
byte vScrollClicks = (byte) event.getAxisValue(MotionEvent.AXIS_VSCROLL);
|
||||||
|
conn.sendMouseScroll(vScrollClicks);
|
||||||
|
}
|
||||||
|
|
||||||
if ((changedButtons & MotionEvent.BUTTON_PRIMARY) != 0) {
|
if ((changedButtons & MotionEvent.BUTTON_PRIMARY) != 0) {
|
||||||
if ((event.getButtonState() & MotionEvent.BUTTON_PRIMARY) != 0) {
|
if ((event.getButtonState() & MotionEvent.BUTTON_PRIMARY) != 0) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user