libsdl-org/sdl2-compat

sdl2-compat builds with SDL_JOYSTICK_DISABLED

1bsyl opened this issue · 3 comments

1bsyl commented

not sure why it builds with SDL_JOYSTICK_DISABLED

so that ./testjoystick prints:
ERROR: SDL compiled without Joystick support.

1bsyl commented

maybe because it uses SDL_config_minimal ...

include/SDL2/SDL_config_ngage.h:#define SDL_JOYSTICK_DISABLED   1
include/SDL2/SDL_config.h.cmake:#cmakedefine SDL_JOYSTICK_DISABLED @SDL_JOYSTICK_DISABLED@
include/SDL2/SDL_config.h.in:#undef SDL_JOYSTICK_DISABLED
include/SDL2/SDL_config_minimal.h:#define SDL_JOYSTICK_DISABLED   1
include/SDL2/SDL_config_winrt.h:#define SDL_JOYSTICK_DISABLED 1

This fixme is related:

sdl2-compat/CMakeLists.txt

Lines 568 to 569 in 2c8012a

# FIXME: how to handle SDL_config.h? Generate a new one from SDL_config.h.cmake? Copy SDL_config.h + SDL_config_xxxxx.h?
install(FILES "${_hdr}" DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/SDL2")

SDL3 eliminated installation of generated headers.
I think the sdl2-compat headers should assume everything is available, and internally fail those functions if dlsym cannot find something.