mirror of
https://github.com/moonlight-stream/moonlight-android.git
synced 2026-06-16 22:01:14 +00:00
Disable back mouse button on Xiaomi devices to workaround issue
This commit is contained in:
@@ -1031,6 +1031,9 @@ public class Game extends Activity implements SurfaceHolder.Callback,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// HACK: Disable mouse back button press on Xiaomi due to reported
|
||||||
|
// issues with right clicks triggering it.
|
||||||
|
if (!("Xiaomi".equalsIgnoreCase(Build.MANUFACTURER))) {
|
||||||
if ((changedButtons & MotionEvent.BUTTON_BACK) != 0) {
|
if ((changedButtons & MotionEvent.BUTTON_BACK) != 0) {
|
||||||
if ((event.getButtonState() & MotionEvent.BUTTON_BACK) != 0) {
|
if ((event.getButtonState() & MotionEvent.BUTTON_BACK) != 0) {
|
||||||
conn.sendMouseButtonDown(MouseButtonPacket.BUTTON_X1);
|
conn.sendMouseButtonDown(MouseButtonPacket.BUTTON_X1);
|
||||||
@@ -1043,6 +1046,7 @@ public class Game extends Activity implements SurfaceHolder.Callback,
|
|||||||
// button press to trigger a right-click.
|
// button press to trigger a right-click.
|
||||||
gotBackPointerEvent = true;
|
gotBackPointerEvent = true;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if ((changedButtons & MotionEvent.BUTTON_FORWARD) != 0) {
|
if ((changedButtons & MotionEvent.BUTTON_FORWARD) != 0) {
|
||||||
if ((event.getButtonState() & MotionEvent.BUTTON_FORWARD) != 0) {
|
if ((event.getButtonState() & MotionEvent.BUTTON_FORWARD) != 0) {
|
||||||
|
|||||||
Reference in New Issue
Block a user