Sign in to follow this  

SDL Joysticks.

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

Im wondering would having a usb controller in windows effect weather SDL finds it? Because my program im coding keeps returning 0 when I poll SDL_NumJoysticks() and I know my controller is pluged in and working. Thanks in advance for any help.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
It sounds like a bug in the API.

Try reporting it to the SDL newsgroup:
http://news.gmane.org/gmane.comp.lib.sdl

Share this post


Link to post
Share on other sites
I doubt it is a bug in SDL. SDL should not care what type of interface your joystick uses (USB, serial, game port, or otherwise). Did you send the flag SDL_INIT_JOYSTICK to SDL_Init()? You said you know the joystick is working. How have you verified that the joystick is working?

Share this post


Link to post
Share on other sites
Well to put it simply to both your questions yes I have. Ive used my controller on tons of other applications and my call to initialze SDL is this.

// Intialize SDL
if (SDL_Init(SDL_INIT_AUDIO | SDL_INIT_VIDEO | SDL_INIT_JOYSTICK ) < 0 )

I have no other clue as to why it won't find my controller.

Share this post


Link to post
Share on other sites

This topic is 4277 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this