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

Author Topic: Joystick names and other information  (Read 5025 times)

0 Members and 1 Guest are viewing this topic.

Tronic

  • Newbie
  • *
  • Posts: 16
    • View Profile
    • http://performous.org/
Joystick names and other information
« on: August 13, 2010, 03:14:08 am »
We (Performous developers) need joystick names for controller autodetection. SDL and ClanLib provide this information, but I couldn't find anything about it in SFML docs, so either I missed something or here's a request for such feature.

SDL and ClanLib also fail to display some controls (GHWT guitar tilt sensor) and device identification information (we cannot tell GHWT guitars and drums apart because both look identical on SDL/ClanLib). I'm afraid that there is little that SFML could do to solve this and that the actual problem lies on a lower level (joystick drivers). The required information is available on the evdev API, but apparently it gets lost somewhere along the way.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Joystick names and other information
« Reply #1 on: August 13, 2010, 08:41:29 am »
The way joysticks are supported in SFML is still quite basic, I plan to improve it in SFML 2.
Laurent Gomila - SFML developer

xelanoimis

  • Newbie
  • *
  • Posts: 3
    • View Profile
Joystick names and other information
« Reply #2 on: November 01, 2010, 11:40:06 pm »
I may add that it would be nice to know if a joystick is an xbox 360 controller or not.

On windows people could use xinput for such cotrollers, in parallel with sfml for the other normal joysticks. So there should be a way to avoid allocating the same device to two different players.

Now I use xinput and directinput at once and there's an official (bad looking) piece of code for directinput joysticks to tell if they are 360 controllers. If so I skip those and open them through xinput.

I suppose this could usually work by searching 360 in the name of the driver/joystick, if nothing better is available.

I think other libraries/drivers are available officially or not for wii and sony controllers. And with the new magic wands and other crazy stuff, it would be cool to have some extra support for such joysticks, or at least a way to support them in parallel through other libs.

nfries88

  • Newbie
  • *
  • Posts: 42
    • View Profile
Joystick names and other information
« Reply #3 on: November 02, 2010, 02:35:38 am »
Quote from: "Laurent"
The way joysticks are supported in SFML is still quite basic, I plan to improve it in SFML 2.


That is good to read. I was going to recommend this myself.

While we're on the topic of input devices, are there any plans for supporting multiple mice or touchscreen interfaces in the near future?

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Joystick names and other information
« Reply #4 on: November 02, 2010, 08:04:04 am »
Quote
While we're on the topic of input devices, are there any plans for supporting multiple mice or touchscreen interfaces in the near future?

In the future, yes.
In the near future, probably not.
Laurent Gomila - SFML developer