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 5223

Summary: Xbox One Controller Menu button not registering as Start on Android
Product: SDL Reporter: sdlbugs
Component: joystickAssignee: Sam Lantinga <slouken>
Status: NEW --- QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2    
Version: 2.0.12   
Hardware: All   
OS: Android (All)   
Attachments: Patch which allows Android to read Xbox One Menu Button as Start

Description sdlbugs 2020-07-06 15:27:03 UTC
Created attachment 4404 [details]
Patch which allows Android to read Xbox One Menu Button as Start

Just spotted this during testing. 

Xbox One Wireless Controller (Model 1708) connected via Bluetooth to Amazon Fire TV (AFTT).

The Menu Button (as per diagram here: https://support.xbox.com/help/hardware-network/controller/xbox-one-wireless-controller) reports on most platforms as SDL_CONTROLLER_BUTTON_START but on Android is completely ignored.

It's an easy fix of adding a case for AKEYCODE_MENU to the switch in keycode_to_SDL() in SDL_sysjoystick.c to map the button to SDL_CONTROLLER_BUTTON_START:

        case AKEYCODE_BUTTON_START:
        case AKEYCODE_MENU:    // <-- New bit
            button = SDL_CONTROLLER_BUTTON_START;
            break;

Patch attached.