Jump to content
  • Advertisement
Sign in to follow this  
so88ccer

SDL Game Controller

This topic is 4512 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

Does SDL support game controllers? When I say "game controllers" I mean external controllers like the 360 controller. NOT a joystick. I know SDL supports those. Thanks!

Share this post


Link to post
Share on other sites
Advertisement
As far as SDL is concerned, a game controller is a joystick. So, yes. I've tested it on multiple controllers.

Share this post


Link to post
Share on other sites
Has anyone tested it specifically with the Xbox360 controller? I know that at least some limited functionality will show up, I was just curious how exactly it registers under SDL as (a) I'm wanting to begin using SDL for some dev work and (b) I'm wanting to use the Xbox360 gamepad as my test gamepad.

The reason I ask is that I know that at least at first the Xbox360 gamepad, unless specifically programmed for (using Xinput.dll), had some mapping issues under DirectInput (which is what I assume SDL is using to access gamepads on Win32). I believe the issue was that the shoulder buttons showed up as a "z-axis" instead of as analog buttons, thus pressing both at the same time resulted in a "0.0" just like if neither were pressed, i.e. "L=-1.0" + "R=+1.0" = "L+R=0.0".

Share this post


Link to post
Share on other sites
So i've been looking up XInput and i noticed that it ties in very well with DirectX. Is there anyone out there who knows if it works well with SDL also?

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • 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!