Archived

This topic is now archived and is closed to further replies.

Seriema

SDL with joypad?

Recommended Posts

Hi! I''m learning SDL and I''m making a input handler, it''s nice little library Currently I''m handling joystick events. But I''m curious about joypads. Can''t find anything in the documentation. My guess is that it uses the exact same events as joystick. But my question is: does the directional pad count as JOYAXISMOTION or JOYHATMOTION? How would SDL react with a PS2 like controller (one digital direction cross, two analog sticks)? I don''t own a controller (yet) so I can''t test my way through "No lies of sugar can sweeten the sournes of reality" }+TITANIUM+{ A.K.A. DXnewbie[onMIRC]

Share this post


Link to post
Share on other sites
SDL does rock.

As for the directional pad:
May depend on the controler. Some may map this to normal motion ( like one old crappy one I had I remember ) , whereas, well, others might be otherwise .

No idea with the PS2 style controler... lemme know when you install one (I''m guessing most apps just treat it as one joystick?)

Share this post


Link to post
Share on other sites
it depends on the drivers for the joypad. i hooked an x-box controller to my PC, and downloaded two different drivers (there are no "official" ones, of course)... each one handles the analog and d-pad differently.

Share this post


Link to post
Share on other sites