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 4610 - [Patch] hidapi: Use GameCube adapter controller port for player index
Summary: [Patch] hidapi: Use GameCube adapter controller port for player index
Status: RESOLVED FIXED
Alias: None
Product: SDL
Classification: Unclassified
Component: joystick (show other bugs)
Version: HG 2.0
Hardware: All All
: P2 enhancement
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords: target-2.0.10
Depends on:
Blocks:
 
Reported: 2019-04-26 23:14 UTC by Zack Middleton (zturtleman)
Modified: 2019-06-08 20:38 UTC (History)
0 users

See Also:


Attachments
hidapi: Use GameCube adapter controller port for player index (7.55 KB, patch)
2019-04-26 23:14 UTC, Zack Middleton (zturtleman)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Zack Middleton (zturtleman) 2019-04-26 23:14:21 UTC
Created attachment 3766 [details]
hidapi: Use GameCube adapter controller port for player index

The Nintendo USB GameCube adapter has four controller ports. The attached patch returns the port number as 0 to 3 from SDL_JoystickGetPlayerIndex() and
SDL_JoystickGetDevicePlayerIndex(). It's mostly a copy-edit of the SDL HIDAPI InstanceIDForIndex() code. I'm interested in using this to display the controller port number in a game menu.
Comment 1 Ryan C. Gordon 2019-05-18 18:48:55 UTC
Tagging a bunch of bugs with "target-2.0.10" so we have a clear list of things to address before a 2.0.10 release.

Please note that "addressing" one of these bugs might mean deciding to defer on it until after 2.0.10, or resolving it as WONTFIX, etc. This is just here to tell us we should look at it carefully, and soon.

If you have new information or feedback on this issue, this is a good time to add it to the conversation, as we're likely to be paying attention to this specific report in the next few days/weeks.

Thanks!

--ryan.
Comment 2 Sam Lantinga 2019-06-08 20:38:03 UTC
Patch added, thanks!
https://hg.libsdl.org/SDL/rev/0411f841b035