[SDL] Using Saitek P990 on OS X

Bryan Thibodeau thibodea at cs.umass.edu
Mon Jul 3 13:47:44 PDT 2006


Hi -

   I'm new to SDL and currently I'm trying to use just it's joystick 
interface.  I have everything working OK using a Saitek P990 on Mac OS 
10.4.7, the only issue I have is that, upon start up of my program the 
analog sticks are uncalibrated until I move them to their extrema.  
After that they are mostly calibrated except that the zero for both axes 
on the left stick is -32, and on the right stick the zero for both axes 
is -64.  This behavior is very repeatable.  While I can work around this 
in my code, I'm wondering if theres any simple fix I could use -- is 
there a SDL joystick calibration routine that I am missing?  Do I need 
to use some other calibration routine that is not part of SDL?

I can extract code snippets if anyone really wants them but essentially 
my initialization code is just:
SDL_InitSubSystem(SDL_INIT_JOYSTICK);
joy = SDL_JoystickOpen(0) ;

And in a loop I am calling:
SDL_JoystickUpdate();
SDL_JoystickGetAxis(joy, axes_num);

Thanks in advance.
Bryan




More information about the SDL mailing list