From 57d0c6e4c474aac358dd13f1e3f8b961c1ed47b0 Mon Sep 17 00:00:00 2001 From: Michael Pavone Date: Sat, 28 Nov 2015 14:30:30 -0800 Subject: 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 --- android/src/org/libsdl/app/SDLActivity.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'android/src/org/libsdl/app/SDLActivity.java') 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; -- cgit v1.2.3