USB gamepad

I’ve read somewhere that it is needed to modify SDL source code to get
USB gamepads working, is that true?
I mean, I tryed to detect it as a joystick but none were found. Maybe I
should use some particular key code?
I have got a Logitech Wingman Precision USB, and yes it works with
other games.
Thank you for your help.

Sincerely,
ElvenProgrammer

You most likely do not need to patch SDL for a particular joystick,
some cases however do require you to patch for joystick specific
features.

On *NIX OSes you may need to enable some of the USB/Joystick options
in your kernel’s configuration file, or load the appropriate modules.
On the Win32 platform you may need to install the drivers for your
joypad if the OS does not provide them by default.

As far as I know SDL utilizes OS hardware managers to pickup
joysticks. On Linux for example it will try to pick up /dev/js0,
/dev/input, or something to that extent. I’m not sure how the win32 or
Mac OS * ports work but I’m sure it’s something similar. Also another
thing you can specify which device to use in your source code, you
could also make that feature available by allowing user to pass a flag
pointing to their joystick on the FS. Read through SDL’s manual for
more informaton.

Good luck,

-JDE

The only thought I have is that perhaps windows is hijacking your
joystick? I’ve got quite a few people using PS2 dual-shock controllers
and USB Smart Joy adapters for them. They’ve worked on Windows and Mac
OS without any drivers or additional work by me. SDL just detects it.

If Windows is perhaps intercepting the signals from your
joystick/gamepad and attempting to send some other signals…that
might be trouble.

Cheers.
CaseyOn 7/14/05, Eugenio Favalli <eugenio.favalli at alice.it> wrote:

I’ve read somewhere that it is needed to modify SDL source code to get
USB gamepads working, is that true?
I mean, I tryed to detect it as a joystick but none were found. Maybe I
should use some particular key code?
I have got a Logitech Wingman Precision USB, and yes it works with
other games.
Thank you for your help.

Sincerely,
ElvenProgrammer


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl


Casey O’Donnell
RPI STS Department - Graduate Student

http://homepage.mac.com/codonnell/
http://homepage.mac.com/codonnell/wxsync/
http://homepage.mac.com/codonnell/wxblogger/