Jump to content
  • Advertisement

Archived

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

Seriema

SDL with joypad?

This topic is 5526 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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
Advertisement
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

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!