mirror of
https://github.com/2009scape/2009Scape-mobile.git
synced 2025-12-19 21:10:11 -07:00
optimize keyEvents by checking only changes in state
This commit is contained in:
parent
caf7073866
commit
f35b880413
1 changed files with 1 additions and 0 deletions
|
|
@ -615,6 +615,7 @@ public class BaseMainActivity extends LoggableActivity {
|
|||
@Override
|
||||
public boolean dispatchKeyEvent(KeyEvent event) {
|
||||
System.out.println(event);
|
||||
if(event.getRepeatCount() != 0) return true; //We consume but no need to recheck since it was already sent once.
|
||||
|
||||
if(Gamepad.isGamepadEvent(event)){
|
||||
if(gamepad == null){
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue