mirror of
https://github.com/moonlight-stream/moonlight-android.git
synced 2025-07-20 03:23:07 +00:00
Add a hack for the Tablet Remote app to fix the B button
This commit is contained in:
parent
ec71060d98
commit
6d1cbc5a64
@ -266,8 +266,22 @@ public class ControllerHandler {
|
|||||||
return KeyEvent.KEYCODE_DPAD_DOWN;
|
return KeyEvent.KEYCODE_DPAD_DOWN;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Past here we can fixup the keycode and potentially trigger
|
||||||
|
// another special case so we need to remember what keycode we're using
|
||||||
|
int keyCode = event.getKeyCode();
|
||||||
|
|
||||||
|
// This is a hack for (at least) the "Tablet Remote" app
|
||||||
|
// which sends BACK with META_ALT_ON instead of KEYCODE_BUTTON_B
|
||||||
|
if (keyCode == KeyEvent.KEYCODE_BACK &&
|
||||||
|
!event.hasNoModifiers() &&
|
||||||
|
(event.getFlags() & KeyEvent.FLAG_SOFT_KEYBOARD) != 0)
|
||||||
|
{
|
||||||
|
keyCode = KeyEvent.KEYCODE_BUTTON_B;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
return event.getKeyCode();
|
return keyCode;
|
||||||
}
|
}
|
||||||
|
|
||||||
private Vector2d handleDeadZone(float x, float y, float deadzoneRadius) {
|
private Vector2d handleDeadZone(float x, float y, float deadzoneRadius) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user