mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-09-06 03:18:13 +00:00
Fix joystick (/dev/input/xxx) support on FreeBSD
Backport f8ad4abe
from main branch.
When switching to CMake, src/joystick/linux/SDL_sysjoystick.c file got
excluded from FreeBSD builds, losing support for /dev/input/xxx devices.
See also: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=279907
and: https://github.com/libsdl-org/SDL/pull/10087
This commit is contained in:

committed by
Sam Lantinga

parent
6a2dd96ac7
commit
ab5740bde2
@@ -1675,7 +1675,7 @@ elseif(UNIX AND NOT APPLE AND NOT RISCOS AND NOT HAIKU)
|
||||
if(FREEBSD OR NETBSD OR OPENBSD OR BSDI)
|
||||
CheckUSBHID()
|
||||
endif()
|
||||
if(LINUX AND HAVE_LINUX_INPUT_H AND NOT ANDROID)
|
||||
if((LINUX OR FREEBSD) AND HAVE_LINUX_INPUT_H AND NOT ANDROID)
|
||||
set(SDL_JOYSTICK_LINUX 1)
|
||||
file(GLOB JOYSTICK_SOURCES ${SDL2_SOURCE_DIR}/src/joystick/linux/*.c ${SDL2_SOURCE_DIR}/src/joystick/steam/*.c)
|
||||
list(APPEND SOURCE_FILES ${JOYSTICK_SOURCES})
|
||||
|
Reference in New Issue
Block a user