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

[Android] Virtual DPAD remote not registered #1832

Closed
SDLBugzilla opened this issue Feb 10, 2021 · 0 comments
Closed

[Android] Virtual DPAD remote not registered #1832

SDLBugzilla opened this issue Feb 10, 2021 · 0 comments

Comments

@SDLBugzilla
Copy link
Collaborator

This bug report was migrated from our old Bugzilla tracker.

These attachments are available in the static archive:

Reported in version: 2.0.3
Reported for operating system, platform: Android (All), ARM

Comments on the original bug report:

On 2015-04-17 18:17:54 +0000, Sylvain wrote:

I have an android device to which I try to connect the google virtual remote application.
https://play.google.com/store/apps/details?id=com.google.android.tv.remote

The java method "pollInputDevices()" detects it as an input source 0x701 which is (SOURCE_KEYBOARD | SOURCE_GAMEPAD | SOURCE_DPAD).

It it not added because it does not AND-bitwise with "SOURCE_CLASS_JOYSTICK".
It's only a virtual DPAD and it works when checking also with SOURCE_CLASS_BUTTON

          if( (joystickDevice.getSources() & InputDevice.SOURCE_CLASS_JOYSTICK) != 0 ||
               (joystickDevice.getSources() & InputDevice.SOURCE_CLASS_BUTTON) != 0) {

See also:
https://bugzilla.libsdl.org/show_bug.cgi?id=2948

Thanks

On 2015-06-17 05:19:25 +0000, Sam Lantinga wrote:

Can you provide a tested patch for this issue?

Thanks!

On 2015-06-17 06:35:03 +0000, Sylvain wrote:

Created attachment 2181
patch

Here it is!

On 2015-06-17 06:58:35 +0000, Sam Lantinga wrote:

Fixed, thanks!
https://hg.libsdl.org/SDL/rev/f6567f77f663

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