| Summary: | Android: When physical keyboards get opened with SDL_JoystickOpen, it breaks arrow key events | ||
|---|---|---|---|
| Product: | SDL | Reporter: | Anthony @ POW Games <ant> |
| Component: | joystick | Assignee: | ny00 |
| Status: | RESOLVED FIXED | QA Contact: | Sam Lantinga <slouken> |
| Severity: | normal | ||
| Priority: | P2 | CC: | sylvain.becker |
| Version: | 2.0.4 | ||
| Hardware: | All | ||
| OS: | Android (All) | ||
|
Description
Anthony @ POW Games
2016-01-12 15:06:13 UTC
In SDLActivity.java I propose adding: && (joystickDevice.getSources() & InputDevice.SOURCE_KEYBOARD) == 0 to the condition in pollInputDevices() that decides to add the joystick. This filters out keyboards. I see no reason why a keyboard needs to be added as a joystick on the Android platform. It causes a lot of problems when trying to use real USB joysticks and it breaks the events from keyboards. Can you check whether the latest version in Mercurial fixes your issue? http://www.libsdl.org/tmp/SDL-2.0.zip Thanks! This bug talks somehow about this issue: https://bugzilla.libsdl.org/show_bug.cgi?id=3444 > I could hack this behaviour and treat joystick button 11 as UP and 12 as DOWN,
> but I have USB game controllers with buttons of the same index.
11, 12, 13, 14 are meant to be:
SDL_CONTROLLER_BUTTON_DPAD_UP,
SDL_CONTROLLER_BUTTON_DPAD_DOWN,
SDL_CONTROLLER_BUTTON_DPAD_LEFT,
SDL_CONTROLLER_BUTTON_DPAD_RIGHT,
Fixed, thanks! https://hg.libsdl.org/SDL/rev/a5bc0d82dca4 |