From c2d7ae230ce7081dbc447a22b55132cece461d7c Mon Sep 17 00:00:00 2001 From: mittorn Date: Wed, 19 Aug 2015 22:09:14 +0700 Subject: [PATCH] Handle all key events as keyboard --- src/org/libsdl/app/SDLActivity.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/org/libsdl/app/SDLActivity.java b/src/org/libsdl/app/SDLActivity.java index d5cfc6ad..09c7ff6e 100644 --- a/src/org/libsdl/app/SDLActivity.java +++ b/src/org/libsdl/app/SDLActivity.java @@ -1174,7 +1174,7 @@ View.OnKeyListener, View.OnTouchListener, SensorEventListener { // Some SOURCE_DPAD or SOURCE_GAMEPAD are also SOURCE_KEYBOARD // So, we try to process them as DPAD or GAMEPAD events first, if that fails we try them as KEYBOARD - if ( (event.getSource() & InputDevice.SOURCE_GAMEPAD) != 0 || + /*if ( (event.getSource() & InputDevice.SOURCE_GAMEPAD) != 0 || (event.getSource() & InputDevice.SOURCE_DPAD) != 0 ) { if (event.getAction() == KeyEvent.ACTION_DOWN) { if (SDLActivity.onNativePadDown(event.getDeviceId(), keyCode) == 0) { @@ -1185,8 +1185,8 @@ View.OnKeyListener, View.OnTouchListener, SensorEventListener { return true; } } - } - + }*/ + /* Handle all events as keyboard */ if( (event.getSource() & InputDevice.SOURCE_KEYBOARD) != 0) { if (event.getAction() == KeyEvent.ACTION_DOWN) { //Log.v("SDL", "key down: " + keyCode);