Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Retrieve a name of a joystick.  (Read 3704 times)

0 Members and 2 Guests are viewing this topic.

Verra

  • Newbie
  • *
  • Posts: 23
    • View Profile
Retrieve a name of a joystick.
« 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.

select_this

  • Full Member
  • ***
  • Posts: 130
  • Current mood: just ate a pinecone
    • View Profile
    • darrenferrie.com
Follow me on Twitter, why don'tcha? @select_this

Verra

  • Newbie
  • *
  • Posts: 23
    • View Profile
Re: Retrieve a name of a joystick.
« Reply #2 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.

Mario

  • SFML Team
  • Hero Member
  • *****
  • Posts: 879
    • View Profile
Re: Retrieve a name of a joystick.
« Reply #3 on: August 10, 2015, 12:34:05 pm »
It just got added last year or so. :)

Verra

  • Newbie
  • *
  • Posts: 23
    • View Profile
Re: Retrieve a name of a joystick.
« Reply #4 on: August 10, 2015, 08:10:47 pm »
Makes sense last time I built sfml was a while ago.

 

anything