The SDL forums have moved to discourse.libsdl.org.
This is just a read-only archive of the previous forums, to keep old links working.
SDL
Simple Directmedia Layer Forums
Open Joystick not consistent IDs
MaddMaxx
Joined: 20 Nov 2015
Posts: 1
Posted: Sun Nov 22, 2015 5:52 pm
Hello, we are trying to run two instances of SDL for a robotics project. One instance of SDL to control robot 1 and another instance to control robot 2 through separate joysticks. We are plugging in two Microsoft XBox 360 controllers to the same laptop running Mac OS X 10.10.5.
The problem is:
Code:
// Open SDL connection with the joystick
m_joy = SDL_JoystickOpen(m_joystickID);
Is not consistent with separate instances of SDL. For example.
We assign Instance 1 to open id 0 and Instance 2 to open id 1. Most of the time they end up both mapping to the same controller and only some of the time do they go to different controllers. As a sanity check we tried assigning both opens to joystick 0 yet still same behavior.