SDL2 joystick interrogator

Moderator
Posts: 713
Joined: 2002.04
Post: #1
[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.

Mark Bishop
--
Student and freelance OS X & iOS developer
Quote this message in a reply
⌘-R in Chief
Posts: 1,277
Joined: 2002.05
Post: #2
Oooo. Snow Leopard.
Quote this message in a reply
Moderator
Posts: 713
Joined: 2002.04
Post: #3
[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.

Mark Bishop
--
Student and freelance OS X & iOS developer
Quote this message in a reply
Moderator
Posts: 3,591
Joined: 2003.06
Post: #4
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.
Quote this message in a reply
Moderator
Posts: 713
Joined: 2002.04
Post: #5
@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

Mark Bishop
--
Student and freelance OS X & iOS developer
Quote this message in a reply
Moderator
Posts: 713
Joined: 2002.04
Post: #6
[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.

Mark Bishop
--
Student and freelance OS X & iOS developer
Quote this message in a reply
Post Reply