The SDL forums have moved to
This is just a read-only archive of the previous forums, to keep old links working.

SDL Forum Index
Simple Directmedia Layer Forums
Multiple controller issues

Joined: 21 Oct 2016
Posts: 6
I am having a problem with multiple controllers.
The joystick ID is 1 for the first joypad and 0 for the second joypad.

Is there a fix for this or does anyone have example code I can follow to avoid this issue?


Joined: 04 Feb 2017
Posts: 2

You didn't provide a lots of informations here... you don't make it easy for people who could help you..
You should add so informations about how you handle things and why you think the joystick with ID 0 is your second joystick

By the way, I also have a problem with the joystick IDs they increments each time you connect and disconnect them...
Do you have the same behavior ? maybe your problem is related to mine.

Joined: 21 Oct 2016
Posts: 6
My issue is that If I start with multiple controllers, joypadID = 1 is the first joypad that gets added, then joypadID = 0 is the second joypad.

Yes I also have the problem with the reconnect joystick.
I used a map and an int I increment everytime a joystick is connected to kep track of this.