Mercurial > repos > blastem
diff android/src/org/libsdl/app/SDLActivity.java @ 903:0e5f9d6135be
Make nexus player remote useable as a controller for games that only require a dpad + start + c. Use warning() instead of fprintf(stder,...) in io.c
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Sat, 28 Nov 2015 14:30:30 -0800 |
parents | 09f5a349e881 |
children | 78abbabfd58d |
line wrap: on
line diff
--- a/android/src/org/libsdl/app/SDLActivity.java Fri Nov 27 13:10:02 2015 -0800 +++ b/android/src/org/libsdl/app/SDLActivity.java Sat Nov 28 14:30:30 2015 -0800 @@ -672,8 +672,7 @@ // 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() & 0x00000401) != 0 || /* API 12: SOURCE_GAMEPAD */ - (event.getSource() & InputDevice.SOURCE_DPAD) != 0 ) { + if ( (event.getSource() & InputDevice.SOURCE_GAMEPAD) == InputDevice.SOURCE_GAMEPAD) { if (event.getAction() == KeyEvent.ACTION_DOWN) { if (SDLActivity.onNativePadDown(event.getDeviceId(), keyCode) == 0) { return true;