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

View File

@@ -1266,6 +1266,7 @@ elseif(UNIX AND NOT APPLE AND NOT ANDROID AND NOT RISCOS)
endif()
# Always compiled for Linux, unconditionally:
set(SOURCE_FILES ${SOURCE_FILES} "${SDL2_SOURCE_DIR}/src/core/linux/SDL_evdev_capabilities.c")
set(SOURCE_FILES ${SOURCE_FILES} "${SDL2_SOURCE_DIR}/src/core/linux/SDL_threadprio.c")
# src/core/unix/*.c is included in a generic if(UNIX) section, elsewhere.