+1 vote

With Godot 2.1.4
The included gamepad of an Nvidia shield android machine does not seem to trigger L2 and R2 buttons.
I do not get any input events while pressing them.

When I connect a xbox 360 gamepad to that box I do get input events.
Here are prints from a computer with that xbox 360 gamepad connected when I press those buttons:
"Device 0 ID 1019 Event: JoystickButton Pressed: 1 Index: 6 pressure 0" and "Device 0 ID 1024 Event: JoystickButton Pressed: 0 Index: 6 pressure 0" for L2
"Device 0 ID 1335 Event: JoystickButton Pressed: 1 Index: 7 pressure 0" and "Device 0 ID 1338 Event: JoystickButton Pressed: 0 Index: 7 pressure 0" for R2

I think gamepad support in Godot is great, works well on almost all platforms as expected, tests on Microsoft Edge for the xbox do work, but not the nvidia..
Can there be something done to fix this? I would like to release my tool with gamepad support for Android TV.

I've done projects with flash and javascript and they all have similar problems with that buttons I believe. Then I used other buttons, maybe necessary?

in Engine by (32 points)

It could be a bug, can you try to do a remote debug and see what prints out from the device?

Ok, remote deploying on android with godot was my first time today with Godot :)
I followed this tutorial for remote debugging:
http://codetuto.com/2016/06/godot-engine-remote-debug-live-edit/
Deploying succeeded, nice, live editing and deploy with remote debug was enabled, but I cannot see any print or output accept for this, on the command line that launches godot:

...
s = signature was verified
m = entry is listed in manifest
k = at least one certificate was found in keystore
i = at least one certificate was found in identity scope
jar verified.
Warning:
This jar contains entries whose certificate chain is not validated.
This jar contains signatures that does not include a timestamp. Without a timestamp, users may not be able to validate this jar after the signer certificate's expiration date (2045-02-26) or after any future revocation date.
Re-run with the -verbose and -certs options for more details.
Uninstalling previous version: Nvidia SHIELD Android TV
Success
Installing into device (please wait..): Nvidia SHIELD Android TV
Success
error: more than one device/emulator
Reverse result: 1
error: more than one device/emulator
Reverse result2: 1
Starting: Intent { act=android.intent.action.MAIN cmp=org.godotengine.musicnoteshelper/org.godotengine.godot.Godot }

<<

The error: more than one device/emulator means probably something is wrong to get the output to my computers, I’ve tried on a windows and on a linux machine, same result, tried adb kill-server, and reconnecting, same result

When I posted the question I was already debugging trough printing my print statements in a textfield
I did an html5 export on http://ictbram.com/music/
You can see that trough the pancake menu, and then pressing the open button, next to debugging

the code that prints the input event is:
func input(event):
if event.type == InputEvent.JOYSTICK
BUTTON:
Utils.debugPrint(str(event))

even without that" if event.type == InputEvent.JOYSTICK_BUTTON: " nothing gets printed

Any further advice, maybe on getting that remote debugging in order, or something else?
Thanks

I don't know what could be causing that error (maybe the device and emulator are active for adb?), check with adb devices.

Be sure to have the correct ip address selected in editor settings>network.

Thx, but no good result. I've tried setting the correct ip address in editor settings > network
, also tried different port numbers, 8000 and 6010 , Disabled the firewall on my computer
adb devices gives only one connection:
150.227.126.103:5555 device
always this kind of output:
jdk.jar.disabledAlgorithms=MD2, MD5, RSA keySize < 1024
Uninstalling previous version: Nvidia SHIELD Android TV
running cmdline: "C:/Users/hallo/AppData/Local/Android/sdk/platform-tools/adb.exe" "-s" "150.227.126.103:5555" "uninstall" "org.godotengine.musicnoteshelper"
Success
Installing into device (please wait..): Nvidia SHIELD Android TV
running cmdline: "C:/Users/hallo/AppData/Local/Android/sdk/platform-tools/adb.exe" "-s" "150.227.126.103:5555" "install" "-r" "C:\Users\hallo\AppData\Roaming/Godot/tmp/tmpexport.apk"
Success
running cmdline: "C:/Users/hallo/AppData/Local/Android/sdk/platform-tools/adb.exe" "-s" "150.227.126.103:5555" "reverse" "--remove-all"
running cmdline: "C:/Users/hallo/AppData/Local/Android/sdk/platform-tools/adb.exe" "-s" "150.227.126.103:5555" "reverse" "tcp:6010" "tcp:6010"
error: more than one device/emulator
Reverse result: 0
running cmdline: "C:/Users/hallo/AppData/Local/Android/sdk/platform-tools/adb.exe" "-s" "150.227.126.103:5555" "reverse" "tcp:6010" "tcp:6010"
error: more than one device/emulator
Reverse result2: 0
running cmdline: "C:/Users/hallo/AppData/Local/Android/sdk/platform-tools/adb.exe" "-s" "150.227.126.103:5555" "shell" "am" "start" "-a" "android.intent.action.MAIN" "-n" "org.godotengine.musicnoteshelper/org.godotengine.godot.Godot"
Starting: Intent { act=android.intent.action.MAIN cmp=org.godotengine.musicnoteshelper/org.godotengine.godot.Godot }

only one time I've got and error after the above output, maybe not related:
ERROR: OSWindows::kill: Condition ' !processmap->has(ppid) ' is true. returned: FAILED
At: platform\windows\os
windows.cpp:1986

It's a bit sad those buttons don't come trough, this is on a Tegra X1 shield console device, with first gen gamepads from the us. They've updated the controllers I believe.
I've got another shield device: The handheld shield portable, which is an older machine, but all the buttons work as expected.

If works on the old model and not on the new one, that may be a bug or unsupported hardware problem, open an issue on github with all the details you can give so somebody can look at it.

Please log in or register to answer this question.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.