We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 3424

Summary: SDL_GameController: Increase k_nMaxReverseEntries
Product: SDL Reporter: ny00
Component: joystickAssignee: Sam Lantinga <slouken>
Status: RESOLVED FIXED QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2    
Version: HG 2.0   
Hardware: All   
OS: Android (All)   
Attachments: Patch

Description ny00 2016-09-14 20:58:35 UTC
Created attachment 2561 [details]
Patch

On Android, the keycodes KEYCODE_BUTTON_1..16 (actual values 188-203) are translated to SDL_Joystick buttons no. 20-35. These are currently ignored in SDL_gamecontroller.c.

The attached patch fixes this, by increasing k_nMaxReverseEntries from 20 to another arbitrary bound of 48.

Side-note: Maybe some log should be emitted in case of going over any such bound?
Comment 1 Sam Lantinga 2016-10-01 20:02:49 UTC
Fixed, thanks!
https://hg.libsdl.org/SDL/rev/c5b42350ccbb

Agreed on your side note. Would you like to submit another bug and patch to cover that?
Comment 2 ny00 2016-10-02 14:16:51 UTC
(In reply to Sam Lantinga from comment #1)
> Fixed, thanks!
> https://hg.libsdl.org/SDL/rev/c5b42350ccbb

Great, more game controllers' features should be usable now!

> Agreed on your side note. Would you like to submit another bug and patch to
> cover that?

Done! See bug 3438.