Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Joysticks not working on linux #742
The sf::Joystick::isConnected() method doesn't work on linux. I've tested with xubuntu running 3.16 with a wired PS3 controller and on an Arch system running 3.17 with an xbox one controller. Both showed up in a "ls /dev/input/js*" command, but neither one came up when I searched for available joysticks via SFML. The problem seems to be with the use of std::ostringstream. It looks like the << operator overwrites the text given in the constructor, leading to SFML checking if /dev/input/0s is open for reading instead of js0, etc. This issue is present in both the updatePluggedList() and open() functions of the Unix JoystickImpl.cpp file.