mirror of
https://github.com/joel16/SDL2.git
synced 2025-03-03 00:55:31 +00:00
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. --HG-- extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40212
This commit is contained in:
parent
1fc7708dc0
commit
75c71e3f4b
@ -930,8 +930,8 @@ CheckInputEvents()
|
||||
{
|
||||
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
|
||||
|
@ -143,9 +143,8 @@ int SDL_SYS_JoystickInit(void)
|
||||
"/dev/js%d",
|
||||
#ifdef USE_INPUT_EVENTS
|
||||
"/dev/input/event%d"
|
||||
#else
|
||||
"/dev/input/js%d"
|
||||
#endif
|
||||
"/dev/input/js%d"
|
||||
};
|
||||
int numjoysticks;
|
||||
int i, j, done;
|
||||
@ -222,6 +221,15 @@ int SDL_SYS_JoystickInit(void)
|
||||
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);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user