Skip to content

Commit

Permalink
Fix joystick (/dev/input/xxx) support on FreeBSD
Browse files Browse the repository at this point in the history
Backport f8ad4ab 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: #10087

(cherry picked from commit ab5740b)
  • Loading branch information
martymac authored and slouken committed Jun 23, 2024
1 parent 53cf48f commit f08f458
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1674,7 +1674,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})
Expand Down

0 comments on commit f08f458

Please sign in to comment.