[Android] Try to improve handling of some dpad+gamepad+keyboard corner cases
authorGabriel Jacobo <gabomdq@gmail.com>
Mon, 11 Nov 2013 11:12:43 -0300
changeset 7959fb3307cd5609
parent 7958 b8f431cd7819
child 7960 904d473b8845
[Android] Try to improve handling of some dpad+gamepad+keyboard corner cases
android-project/src/org/libsdl/app/SDLActivity.java
     1.1 --- a/android-project/src/org/libsdl/app/SDLActivity.java	Mon Nov 11 10:59:15 2013 -0300
     1.2 +++ b/android-project/src/org/libsdl/app/SDLActivity.java	Mon Nov 11 11:12:43 2013 -0300
     1.3 @@ -612,10 +612,11 @@
     1.4                  } else if (event.getAction() == KeyEvent.ACTION_UP) {
     1.5                      SDLActivity.onNativePadUp(id, keyCode);
     1.6                  }
     1.7 +                return true;
     1.8              }
     1.9 -            return true;
    1.10          }
    1.11 -        else if( (event.getSource() & InputDevice.SOURCE_KEYBOARD) != 0) {
    1.12 +        
    1.13 +        if( (event.getSource() & InputDevice.SOURCE_KEYBOARD) != 0) {
    1.14              if (event.getAction() == KeyEvent.ACTION_DOWN) {
    1.15                  //Log.v("SDL", "key down: " + keyCode);
    1.16                  SDLActivity.onNativeKeyDown(keyCode);