SFML community forums

General => Feature requests => Topic started by: Verra on August 09, 2015, 09:15:38 pm

Title: Retrieve a name of a joystick.
Post by: Verra on August 09, 2015, 09:15:38 pm
When using the joystick module for a gamepad. I always end up having a lot of issues between platform/controller/driver. For example the joystick y inputs might be flipped on windows for the same controller. Something that might aid in being able to detect what controller is being used and thus using it correctly would be having a way to know the name or driver name of the controller plugged in.

So for example the API might look like: static sf::String sf::Joystick::getInfo(unsigned int joystick);

I might look into how this could be done within sfml.
Title: Re: Retrieve a name of a joystick.
Post by: select_this on August 09, 2015, 09:20:30 pm
http://www.sfml-dev.org/documentation/2.3/structsf_1_1Joystick_1_1Identification.php (http://www.sfml-dev.org/documentation/2.3/structsf_1_1Joystick_1_1Identification.php)?
Title: Re: Retrieve a name of a joystick.
Post by: Verra on August 09, 2015, 11:10:51 pm
Man do I feel stupid, I've literally never seen this in the years that I've been using sfml.
Title: Re: Retrieve a name of a joystick.
Post by: Mario on August 10, 2015, 12:34:05 pm
It just got added last year or so. :)
Title: Re: Retrieve a name of a joystick.
Post by: Verra on August 10, 2015, 08:10:47 pm
Makes sense last time I built sfml was a while ago.