Jump to content

  • Log In with Google      Sign In   
  • Create Account

Another issue with SDL joystick


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
2 replies to this topic

#1 tashaklikedi   Members   -  Reputation: 218

Like
0Likes
Like

Posted 30 September 2012 - 10:46 PM

Hi again, I ran into another problem with the joystick in SDL:

in libsdl.org, it says that the joystick has 8 directions with the hat: up, down, left, right, upleft, upright, downleft, downright. But when I press the up button, it reads at the same time up, upleft, up right. This is the same for each direction (for example, if I press left, it will read left, upleft, downleft. I wonder if this is normal, if there is a problem with my joystick, or if the problem is in my code (which is a uber simplistic program to see if I get my joystick to work).

Did anybody ran into this kind of problems? (please dont send me the LazyFoo links, because there is nothing about hats there ^^)

Sponsor:

#2 Faelenor   Members   -  Reputation: 396

Like
0Likes
Like

Posted 01 October 2012 - 07:11 AM

Are you sure your joystick is calibrated? If you're using Windows, go in the game controllers window. You'll be able to at least determine if your joystick is working properly. Otherwise, if you're handling inputs in a switch statement, maybe you have missing breaks?

#3 tashaklikedi   Members   -  Reputation: 218

Like
0Likes
Like

Posted 02 October 2012 - 05:10 AM

I'm sure it is calibrated, yet I recalibrated it, and I checked my code if I missed any breaks in my switch statement, and there was none missed :/ this is really weird... And the "HAT_CENTERED" position in the SDL API does not seem to work :/ this is really weird...




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS