Joystick problems

hi. i’m compiling an SDL app on win32 with the mingw toolkit. i’m
running into a strange problem with the joystick, where it freezes on the
command to open the joystick, and the app must be force-killed.

this is the code that freezes:

if( SDL_Init(SDL_INIT_JOYSTICK) < 0 ) {
} else {
if( SDL_NumJoysticks() > 0 ) {
joy = SDL_JoystickOpen(0);

the SDL_JoystickOpen() command is where the freeze occurs. it seems to
occur only on machines that have no joystick installed through the windows
control panel, or on machines that have a joystick installed but is not
plugged in. it works fine on every machine i’ve tried with a joystick

has anyone else run into this problem?

many thanks,
and here is a shameless plug for the first project i’m making with SDL: :slight_smile: (release in 1 month!)

“We’re on a mission from God.”
– The Blues Brothers

has anyone else run into this problem?

It’s a bug in SDL 1.1.7, grab the latest CVS snapshot for the fix:

See ya!
-Sam Lantinga, Lead Programmer, Loki Entertainment Software