# HG changeset patch # User Sam Lantinga # Date 1003786490 0 # Node ID 0cc95f442f3ab9975e3b4eda44cce8e1a236ec2f # Parent 582abf60e21ef15efe2fd84e2bf4d7f5f2b99c16 If we're looking at the /dev/input event devices, and we found at least one, then we don't want to look at the input joystick devices, since they're built on top of devices that we've already seen, so we're done. diff -r 582abf60e21e -r 0cc95f442f3a configure.in --- a/configure.in Thu Oct 18 15:07:09 2001 +0000 +++ b/configure.in Mon Oct 22 21:34:50 2001 +0000 @@ -930,8 +930,8 @@ { dnl Check for Linux 2.4 unified input event interface support AC_ARG_ENABLE(input-events, -[ --enable-input-events use Linux 2.4 unified input interface [default=no]], - , enable_input_events=no) +[ --enable-input-events use Linux 2.4 unified input interface [default=yes]], + , enable_input_events=yes) if test x$enable_input_events = xyes; then AC_MSG_CHECKING(for Linux 2.4 unified input interface) use_input_events=no diff -r 582abf60e21e -r 0cc95f442f3a src/joystick/linux/SDL_sysjoystick.c --- a/src/joystick/linux/SDL_sysjoystick.c Thu Oct 18 15:07:09 2001 +0000 +++ b/src/joystick/linux/SDL_sysjoystick.c Mon Oct 22 21:34:50 2001 +0000 @@ -143,9 +143,8 @@ "/dev/js%d", #ifdef USE_INPUT_EVENTS "/dev/input/event%d" -#else +#endif "/dev/input/js%d" -#endif }; int numjoysticks; int i, j, done; @@ -222,6 +221,15 @@ done = 1; } } + /* This is a special case... + If we're looking at the /dev/input event devices, and we found + at least one, then we don't want to look at the input joystick + devices, since they're built on top of devices that we've already + seen, so we're done. + */ + if ( i > 0 && j > 0 ) { + done = 1; + } } return(numjoysticks); }