iDevGames Forums
SDL2 joystick interrogator - Printable Version

+- iDevGames Forums (http://www.idevgames.com/forums)
+-- Forum: Community Zone (/forum-4.html)
+--- Forum: Work in Progress (/forum-16.html)
+--- Thread: SDL2 joystick interrogator (/thread-11754.html)



SDL2 joystick interrogator - sealfin - Aug 11, 2015 02:45 AM

[Image: sdl2-joystick-interrogator-animation.gif]

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 to my blog the source code to the first version of that utility, for the benefit both of myself and of others.


RE: SDL2 joystick interrogator - SethWillits - Aug 11, 2015 07:15 AM

Oooo. Snow Leopard.


RE: SDL2 joystick interrogator - sealfin - Aug 13, 2015 10:32 AM

[Image: sdl2-joystick-interrogator-animation1.gif]
Interrogating a Sony PlayStation 2 DualShock 2 controller.

The source code to the second version of the utility has been posted to my blog.


RE: SDL2 joystick interrogator - AnotherJake - Aug 13, 2015 06:58 PM

Coming out of the bear cave for a moment. Looks around... Grumbles... I can't believe it's 2015 and joystick input is still not universally simple.


RE: SDL2 joystick interrogator - sealfin - Aug 14, 2015 10:25 AM

@AnotherJake: This is my first foray into SDL2 so I'm likely making this more difficult than it needs to be; still, I've yet to figure out why SDL2 reports that the DualShock 2 has five axes (although my PlayStation-to-USB adapter might be to blame), I've yet to figure out a solution – which doesn't involve a ⅓-axis dead zone – to the problem of the thumbsticks on the DualShock 2 not always returning all the way to the origin when they're released, and I last touched a DualShock 2 a long, long time ago so I'd forgotten that the D-pad is disabled in analogue mode Annoyed


RE: SDL2 joystick interrogator - sealfin - Sep 26, 2015 01:12 AM

[Image: sdl2-joystick-interrogator-animation.gif]
Interrogating a Sony PlayStation 2 DualShock 2 controller.

The source code to the third version of the utility has been posted to my blog.