mirror of
https://github.com/moonlight-stream/moonlight-android.git
synced 2025-07-18 18:42:46 +00:00
Disable back mouse button on Xiaomi devices to workaround issue
This commit is contained in:
parent
66f0aee3f8
commit
cac2bdbb81
@ -1031,17 +1031,21 @@ public class Game extends Activity implements SurfaceHolder.Callback,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((changedButtons & MotionEvent.BUTTON_BACK) != 0) {
|
// HACK: Disable mouse back button press on Xiaomi due to reported
|
||||||
if ((event.getButtonState() & MotionEvent.BUTTON_BACK) != 0) {
|
// issues with right clicks triggering it.
|
||||||
conn.sendMouseButtonDown(MouseButtonPacket.BUTTON_X1);
|
if (!("Xiaomi".equalsIgnoreCase(Build.MANUFACTURER))) {
|
||||||
}
|
if ((changedButtons & MotionEvent.BUTTON_BACK) != 0) {
|
||||||
else {
|
if ((event.getButtonState() & MotionEvent.BUTTON_BACK) != 0) {
|
||||||
conn.sendMouseButtonUp(MouseButtonPacket.BUTTON_X1);
|
conn.sendMouseButtonDown(MouseButtonPacket.BUTTON_X1);
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
conn.sendMouseButtonUp(MouseButtonPacket.BUTTON_X1);
|
||||||
|
}
|
||||||
|
|
||||||
// Don't use the KEYCODE_BACK hack. That will cause this
|
// Don't use the KEYCODE_BACK hack. That will cause this
|
||||||
// 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) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user