mirror of
https://github.com/2009scape/2009Scape-mobile.git
synced 2025-12-19 13:00:12 -07:00
Tweak KeyEvent filtering
This commit is contained in:
parent
c2e851fc8f
commit
00e60ee3bd
1 changed files with 2 additions and 3 deletions
|
|
@ -615,10 +615,9 @@ public class BaseMainActivity extends LoggableActivity {
|
|||
|
||||
@Override
|
||||
public boolean dispatchKeyEvent(KeyEvent event) {
|
||||
|
||||
if(event.getRepeatCount() != 0 || event.getKeyCode() == KeyEvent.KEYCODE_UNKNOWN || (event.getFlags() & KeyEvent.FLAG_FALLBACK) == KeyEvent.FLAG_FALLBACK) return true; //We consume but no need to recheck since it was already sent once.
|
||||
System.out.println(event);
|
||||
if(event.getRepeatCount() != 0 || event.getAction() == KeyEvent.ACTION_MULTIPLE || event.getFlags() == KeyEvent.FLAG_FALLBACK) return true; //We consume but no need to recheck since it was already sent once.
|
||||
|
||||
|
||||
if(Gamepad.isGamepadEvent(event)){
|
||||
if(gamepad == null){
|
||||
gamepad = new Gamepad(this, event.getDevice());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue