Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Button Indices for Android Gamepad. #267

Open
PsykomantaBrain opened this issue Jan 16, 2023 · 0 comments
Open

Button Indices for Android Gamepad. #267

PsykomantaBrain opened this issue Jan 16, 2023 · 0 comments

Comments

@PsykomantaBrain
Copy link

Not so much a feature request as much as a general discussion (sorry if there's a better place for this).

I built a new device this week, or rather, resurrected an old drone controller that was incompatible with everything by giving it new brains in the form of an Arduino Due and the MH Joystick Lib. Set it up as an 8 axis, 8 button device (that's how many the drone controller had).

The device is working ok in windows already as a DirectInput device. But I also want to use it as a gamepad for mobile devices, as the drone controller features a mount for phones and tablets already.

On Android, it was easy enough to get the board recognized as a gamepad using an OTG usb connector. I then used that to calibrate the outputs and order my axes to make the most sense as what android expects of a gamepad layout.

The trouble I'm having now are the buttons. I'd have thought that button 0 would map to gamepad A, 1 to B, and so on, but I'm not getting much luck in getting any button presses detected.

Has anyone ever tried this, and know if there's some special shenanigans that need to be done for buttons to be read as gamepad buttons in Android?

In windows, the same 8 buttons are reporting normally in joy.cpl, no issues.

Thanks in advance for any... (puts on sunglasses) input.

Cheers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant