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

Request for Enhancing Gamepad Trigger Event Support in Android #44

Closed
eungyoda opened this issue Oct 2, 2024 · 3 comments
Closed

Request for Enhancing Gamepad Trigger Event Support in Android #44

eungyoda opened this issue Oct 2, 2024 · 3 comments

Comments

@eungyoda
Copy link

eungyoda commented Oct 2, 2024

I've been using the gamepads package and it's working well.

While checking Android events in my ongoing project, I noticed that the analog events for the Left/Right Trigger buttons are not functioning correctly.

The target device I am using is the Retroid Pocket 4 Pro, which runs Android 13.
This device is a retro gaming console where the Android OS and Gamepad are integrated.

On this device, the AXIS_LTRIGGER and AXIS_RTRIGGER events do not trigger, and instead, the AXIS_BRAKE and AXIS_GAS events generate the analog events for the triggers.

This seems like an oversight from the Chinese developers, or perhaps it’s part of their development philosophy.

In any case, here’s what I’d like to request:

A simple solution would be to add the following to the supportedAxes object in the "EventListener.kt" file:

SupportedAxis(MotionEvent.AXIS_BRAKE),
SupportedAxis(MotionEvent.AXIS_GAS),

Another suggestion would be to add a function to the gamepads object that allows the modification of supportedAxes so that additional events can be specified or unnecessary events can be removed.

If you have a better approach, please feel free to use that. If not, I hope you consider one of the solutions mentioned above.

I am currently using a modified version locally. If I am granted "Contributors" access, I will submit a pull request with the changes I've made.

Thanks. @ALL

@spydon
Copy link
Member

spydon commented Oct 21, 2024

I am currently using a modified version locally. If I am granted "Contributors" access, I will submit a pull request with the changes I've made.

Sorry for the late reply, if you submit a PR we can have a closer look at it!
You don't need to be granted any special roles for submitting a PR, you can read about how to do it here:
https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request

@markvideon
Copy link
Collaborator

markvideon commented Dec 22, 2024

A reasonable proposal I think. Happy to make the change.

I doubt this will be the only instance where device manufacturers have been emitting events to unexpected axes

@markvideon
Copy link
Collaborator

Has been actioned and will be in the next release, probably 0.1.5.

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

3 participants