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

Author Topic: How to tell if the user is using Playstation or Xbox controller?  (Read 1328 times)

0 Members and 2 Guests are viewing this topic.

hyperbolic

  • Newbie
  • *
  • Posts: 2
    • View Profile
Hi, I've been working on a game that uses controllers and I noticed that SFML Joystick inputs are different across Playstation and Xbox controllers. Is there any simple ways to detect whether the connected controller is Playstation or Xbox? If not, are there any suggestions where I can learn to differentiate the two?

G.

  • Hero Member
  • *****
  • Posts: 1593
    • View Profile
Re: How to tell if the user is using Playstation or Xbox controller?
« Reply #1 on: March 10, 2016, 02:57:01 am »
Take a look at sf::Joystick::getIdentification, it returns useful information.

hyperbolic

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: How to tell if the user is using Playstation or Xbox controller?
« Reply #2 on: March 10, 2016, 03:00:01 am »
Take a look at sf::Joystick::getIdentification, it returns useful information.

wow.. i feel silly i didnt see this in the documentation... thanks for this

 

anything