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
@ -267,7 +267,21 @@ public class ControllerHandler {
|
||||
}
|
||||
}
|
||||
|
||||
return event.getKeyCode();
|
||||
// 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 keyCode;
|
||||
}
|
||||
|
||||
private Vector2d handleDeadZone(float x, float y, float deadzoneRadius) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user