summaryrefslogtreecommitdiff
path: root/android/src
diff options
context:
space:
mode:
authorMichael Pavone <pavone@retrodev.com>2015-11-28 14:30:30 -0800
committerMichael Pavone <pavone@retrodev.com>2015-11-28 14:30:30 -0800
commit57d0c6e4c474aac358dd13f1e3f8b961c1ed47b0 (patch)
treeaf2353cf515259fd0e9855884abe4ac9de6d4e72 /android/src
parent9044d255d36de656707389e19deefaed21658527 (diff)
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
Diffstat (limited to 'android/src')
-rw-r--r--android/src/org/libsdl/app/SDLActivity.java3
1 files changed, 1 insertions, 2 deletions
diff --git a/android/src/org/libsdl/app/SDLActivity.java b/android/src/org/libsdl/app/SDLActivity.java
index 49a1d38..62123ea 100644
--- a/android/src/org/libsdl/app/SDLActivity.java
+++ b/android/src/org/libsdl/app/SDLActivity.java
@@ -672,8 +672,7 @@ class SDLSurface extends SurfaceView implements SurfaceHolder.Callback,
// 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;