mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-05-21 20:28:28 +00:00
Added controller mapping for Android TV remotes
Also fixed the back button on the remote exiting the application
This commit is contained in:
parent
4478707b0a
commit
a90be440e8
4 changed files with 29 additions and 1 deletions
|
@ -88,6 +88,8 @@ public class SDLControllerManager
|
|||
}
|
||||
int sources = device.getSources();
|
||||
|
||||
/* This is called for every button press, so let's not spam the logs */
|
||||
/**
|
||||
if ((sources & InputDevice.SOURCE_CLASS_JOYSTICK) == InputDevice.SOURCE_CLASS_JOYSTICK) {
|
||||
Log.v(TAG, "Input device " + device.getName() + " is a joystick.");
|
||||
}
|
||||
|
@ -97,6 +99,7 @@ public class SDLControllerManager
|
|||
if ((sources & InputDevice.SOURCE_GAMEPAD) == InputDevice.SOURCE_GAMEPAD) {
|
||||
Log.v(TAG, "Input device " + device.getName() + " is a gamepad.");
|
||||
}
|
||||
**/
|
||||
|
||||
return (((sources & InputDevice.SOURCE_CLASS_JOYSTICK) == InputDevice.SOURCE_CLASS_JOYSTICK) ||
|
||||
((sources & InputDevice.SOURCE_DPAD) == InputDevice.SOURCE_DPAD) ||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue