udev: Factor out SDL_EVDEV_GuessDeviceClass

This works on capability bitfields that can either come from udev or
from ioctls, so it is equally applicable to both udev and non-udev
input device detection.

Signed-off-by: Simon McVittie <smcv@collabora.com>
This commit is contained in:
Simon McVittie 2020-11-11 19:14:34 -08:00
parent 13e7d1a958
commit 8db3171b98
10 changed files with 153 additions and 69 deletions

4
configure vendored
View file

@ -24838,9 +24838,11 @@ $as_echo "#define SDL_TIMER_UNIX 1" >>confdefs.h
fi
# Set up files for evdev input
if test x$use_input_events = xyes; then
SOURCES="$SOURCES $srcdir/src/core/linux/SDL_evdev*.c"
SOURCES="$SOURCES $srcdir/src/core/linux/SDL_evdev.c"
SOURCES="$SOURCES $srcdir/src/core/linux/SDL_evdev_kbd.c"
fi
# Set up other core UNIX files
SOURCES="$SOURCES $srcdir/src/core/linux/SDL_evdev_capabilities.c"
SOURCES="$SOURCES $srcdir/src/core/linux/SDL_threadprio.c"
SOURCES="$SOURCES $srcdir/src/core/unix/*.c"
;;