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 ) {
support[JOY]=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
installed.
has anyone else run into this problem?
many thanks,
and here is a shameless plug for the first project i’m making with SDL:
http://studiofojar.com/projects/mkgamma/ (release in 1 month!)
steve–
“We’re on a mission from God.”
– The Blues Brothers