[SDL] SDL Joystick calibration

Peter Mulholland darkmatter at freeuk.com
Thu Sep 21 21:53:37 PDT 2006


Hello Mark,

Friday, September 22, 2006, 4:23:15 AM, you wrote:

> Hi all,

> I'm porting an Allegro application to SDL and have a few questions about
> joystick support in SDL:

> 1) Does SDL use the windows joystick calibration data?  I calibrated a
> joystick via Windows Game Controller plugin, and although it shows centered in
> the plugin test, the cursor is way offset using the SDL test program 
> testjoystick.c

Be aware that SDL defaults to the "wingdi" backend currently. This
would use the old multimedia API's for joysticks, which AFAIK don't
follow the calibration data.

If you make your program use the DirectX backend, it will use
DirectInput which should take the calibration into account.

-- 
Best regards,
 Peter                            mailto:darkmatter at freeuk.com





More information about the SDL mailing list