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 5324

Summary: DPad on Xbox 1 S Controller not working on Windows 10
Product: SDL Reporter: Bart van der Werf <bart>
Component: joystickAssignee: Sam Lantinga <slouken>
Status: RESOLVED FIXED QA Contact: Sam Lantinga <slouken>
Severity: critical    
Priority: P2 CC: bart, flibitijibibo, icculus
Version: HG 2.0   
Hardware: x86_64   
OS: Windows 10   
Attachments: Also parse data[12] with dpad values on the xb1s controller
hidapi: Also parse data[12] with dpad values on the xb1s controller

Description Bart van der Werf 2020-10-21 10:37:22 UTC
Created attachment 4482 [details]
Also parse data[12] with dpad values on the xb1s controller

For the xb1s controller the dpad is not working in latest hg sdl, works fine with xbox360 and xb1 controller.

Controller tested: "XBOX 1 S Controller" 'HID\VID_045E&PID_02EA&IG_00' and 'HID\VID_045E&PID_02FF&IG_00' on controller
SDL reports 030000005e040000ea02000000007200 Steam Mapping reports 030000005e040000ea02000000007801.

in SDL_hidapi_xbox360.c HIDAPI_DriverXbox360_HandleStatePacket() the lower nibble of data[12] held the dpad information not data[12]

patch attached that also reads data[12] which was previously unused.

Set to high severity after discussing the issue with flibitijibibo

This seems to have been a regression compared to the older 2018 release of sdl (used by fna 18.02) we've upgraded from.
Comment 1 Ethan Lee 2020-10-21 14:46:15 UTC
Created attachment 4483 [details]
hidapi: Also parse data[12] with dpad values on the xb1s controller

Attached is the previous attachment in hg patch form, for convenience.
Comment 2 Sam Lantinga 2020-11-09 07:49:49 UTC
Fixed, thanks!
https://hg.libsdl.org/SDL/rev/719e7039da21