New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Joysticks not working on linux #742

Closed
ellenpoe opened this Issue Nov 27, 2014 · 2 comments

Comments

Projects
None yet
4 participants
@ellenpoe
Contributor

ellenpoe commented Nov 27, 2014

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.

@eXpl0it3r

This comment has been minimized.

Show comment
Hide comment
@eXpl0it3r

eXpl0it3r Nov 27, 2014

Member

Do we want to fix this for 2.2 or not?

Member

eXpl0it3r commented Nov 27, 2014

Do we want to fix this for 2.2 or not?

@MarioLiebisch

This comment has been minimized.

Show comment
Hide comment
@MarioLiebisch

MarioLiebisch Nov 27, 2014

Member

There are already PRs and ideas up for this and considering it's an elementary system being bugged, I'd strongly vote for an inclusion, especially considering it's rather trivial to test as well.

Member

MarioLiebisch commented Nov 27, 2014

There are already PRs and ideas up for this and considering it's an elementary system being bugged, I'd strongly vote for an inclusion, especially considering it's rather trivial to test as well.

@eXpl0it3r eXpl0it3r added this to the 2.2 milestone Nov 27, 2014

@eXpl0it3r eXpl0it3r self-assigned this Nov 30, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment