SDL2 joystick interrogator 2.0

SDL2 joystick interrogator 2.0

I recently rebooted development of a project I tried to develop for the Ludum Dare 20 contest held in April 2011, the theme of which was “It’s dangerous to go alone! Take this!”

As the project will require a controller with an analogue stick to play I’ve begun to develop a utility to interrogate the capabilities of various controllers; and, as I feel that the SDL2 documentation is lacking with regards to the joystick support offered by that library, I’ve posted – in addition to an executable of that utility for Mac OS X (and I want to release executables for additional platforms – the Raspberry Pi in particular – in the future) – the source code to that utility to GitHub for the benefit both of myself and of others.

Note that to use the utility you will need to have SDL2_image – in addition to SDL2 – installed.

Amongst the changes in version 2.0 of the utility are that:

  • the utility now features support for multiple controllers;
  • the utility now features detection of POV hats (and, contrary to what I wrote in the past, the D-pad of the Sony PlayStation 2 DualShock 2 controller is not disabled in analogue mode – rather, it is in that mode detected as being a POV hat (at least using my PlayStation-to-USB adapter));
  • the utility now features preliminary detection of trackballs – “preliminary” as neither of my controllers (the other being a Sony PlayStation 3 DualShock 3) features a trackball;
  • the utility now features preliminary detection of whether or not a controller has haptic capabilities – “preliminary” as neither of my controllers has been detected as having haptic capabilities in spite of both of my controllers having haptic capabilities (although my adapter or my OS (Mac OS X 10.6 Snow Leopard) might be to blame).

Comments

eva33
04. Sep 2018 · 19:31 UTC
This is the wonderful post i saw today. I really enjoyed lot while reading this post thanks for sharing this kind of useful information.
mummymom
06. Sep 2018 · 10:55 UTC
Thank you so much for the information
Taylah_322
22. Oct 2018 · 10:16 UTC
helO?
vedant12345
30. Oct 2018 · 10:25 UTC
Thank you so much for this site.
26. Nov 2018 · 10:15 UTC
As you’ve probably noticed by the spammy replies by now, this is the old/legacy website of Ludum Dare, the new one is at ldjam dot com. (Hope I’m getting through, since you’re probably ignoring these by now…)
DyraSan
24. Dec 2018 · 07:31 UTC
What is Handling Joysticks??

Is there any specific steps?
DyraSan
25. Dec 2018 · 12:21 UTC
Answer please.