[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 7959 fb3307cd5609
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
--- a/android-project/src/org/libsdl/app/SDLActivity.java	Mon Nov 11 10:59:15 2013 -0300
+++ b/android-project/src/org/libsdl/app/SDLActivity.java	Mon Nov 11 11:12:43 2013 -0300
@@ -612,10 +612,11 @@
                 } else if (event.getAction() == KeyEvent.ACTION_UP) {
                     SDLActivity.onNativePadUp(id, keyCode);
                 }
+                return true;
             }
-            return true;
         }
-        else if( (event.getSource() & InputDevice.SOURCE_KEYBOARD) != 0) {
+        
+        if( (event.getSource() & InputDevice.SOURCE_KEYBOARD) != 0) {
             if (event.getAction() == KeyEvent.ACTION_DOWN) {
                 //Log.v("SDL", "key down: " + keyCode);
                 SDLActivity.onNativeKeyDown(keyCode);