mirror of
https://github.com/2009scape/2009Scape-mobile.git
synced 2025-12-19 21:10:11 -07:00
Proper filtering of fallback keyevents
This commit is contained in:
parent
606d633ee3
commit
52f23f33a9
1 changed files with 2 additions and 1 deletions
|
|
@ -615,8 +615,9 @@ public class BaseMainActivity extends LoggableActivity {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean dispatchKeyEvent(KeyEvent event) {
|
public boolean dispatchKeyEvent(KeyEvent event) {
|
||||||
|
|
||||||
System.out.println(event);
|
System.out.println(event);
|
||||||
if(event.getRepeatCount() != 0 || event.getAction() == KeyEvent.ACTION_MULTIPLE) return true; //We consume but no need to recheck since it was already sent once.
|
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.isGamepadEvent(event)){
|
||||||
if(gamepad == null){
|
if(gamepad == null){
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue