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 2869

Summary: Controllers connected on lauch are reported twice.
Product: SDL Reporter: Martijn Courteaux <courteauxmartijn>
Component: joystickAssignee: Sam Lantinga <slouken>
Status: RESOLVED FIXED QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2 CC: icculus, rodrigo.alfenas
Version: HG 2.1   
Hardware: x86   
OS: Mac OS X (All)   

Description Martijn Courteaux 2015-02-05 23:20:32 UTC
Controller (X360 in my case) that are connected when the application launches generate two SDL_GameControllerDeviceEvents reporting the controller is added. Controllers that are added later do now have this issue.

For now, I simply check against the JoystickID to see if I have already handled it. Haven't done any debugging in SDL yet.

I also tried the suggested patch for bug 2822, but that doesn't work. Not sure if we have the same issue, since he is talking about Joysticks and not GameControllers.

I'm on OS X 10.10.2.
Comment 1 Ryan C. Gordon 2015-02-19 05:22:22 UTC
Marking a large number of bugs with the "triage-2.0.4" keyword at once. Sorry if you got a lot of email from this. This is to help me sort through some bugs in regards to a 2.0.4 release. We may or may not fix this bug for 2.0.4, though!
Comment 2 Ryan C. Gordon 2015-04-07 04:57:56 UTC
(sorry if you get a lot of copies of this email, I'm marking several bugs at once)

Marking bugs for the (mostly) final 2.0.4 TODO list. This means we're hoping to resolve this bug before 2.0.4 ships if possible. In a perfect world, the open bug count with the target-2.0.4 keyword is zero when we ship.

(Note that closing a bug report as WONTFIX, INVALID or WORKSFORME might still happen.)

--ryan.
Comment 3 Ryan C. Gordon 2015-04-09 05:37:34 UTC
To be clear, was this happening with SDL 2.0.3 plus the patch in Bug #2822? Because there was another fix besides that we had applied, and you might not have gotten that if you started from the 2.0.3 source code.

(In short: latest in revision control might fix your problem already.)

--ryan.
Comment 4 Sam Lantinga 2015-05-26 15:56:29 UTC
I verified that this was still active, and fixed it in this changeset:
https://hg.libsdl.org/SDL/rev/9242a9b29c7d

Thanks!