[Android] Try to improve handling of some dpad+gamepad+keyboard corner cases

This commit is contained in:
Gabriel Jacobo 2013-11-11 11:12:43 -03:00
parent 6dbed827a7
commit 04afd61cd9
1 changed files with 3 additions and 2 deletions

View File

@ -612,10 +612,11 @@ class SDLSurface extends SurfaceView implements SurfaceHolder.Callback,
} 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);