I am on Ubuntu 20.04.1 LTS
When I configure, build and use SDL2.0.12, then my gamepad is not found.
The Ubuntu provided SDL2 does work:
$ /usr/bin/sdl2-config --version
2.0.10
$ /usr/bin/sdl2-config --static-libs
-lSDL2 -Wl,--no-undefined -lm -ldl -lasound -lm -ldl -lpthread -lpulse-simple -lpulse -lX11 -lXext -lXcursor -lXinerama -lXi -lXrandr -lXss -lXxf86vm -lwayland-egl -lwayland-client -lwayland-cursor -lxkbcommon -lpthread -lrt
My own-built SDL2 does not:
Enabled modules : atomic audio video render events joystick haptic sensor power filesystem threads timers file loadso cpuinfo assembly
Assembly Math : mmx 3dnow sse sse2 sse3
Audio drivers : disk dummy oss alsa(dynamic) pulse(dynamic) sndio(dynamic)
Video drivers : dummy x11(dynamic) opengl opengl_es1 opengl_es2 vulkan
X11 libraries : xcursor xdbe xinerama xinput2 xinput2_multitouch xrandr xscrnsaver xshape xvidmode
Input drivers : linuxev linuxkd
Using libsamplerate : NO
Using libudev : YES
Using dbus : YES
Using ime : YES
Using ibus : YES
Using fcitx : NO
with this result:
$ /opt/SDL2/bin/sdl2-config --version
2.0.12
$ /opt/SDL2/bin/sdl2-config --static-libs
-L/opt/SDL2/lib -Wl,-rpath,/opt/SDL2/lib -Wl,--enable-new-dtags -lSDL2 -Wl,--no-undefined -lm -ldl -lpthread -lrt
I am beginning to suspect that this has to do with configure not finding wayland support.
Despite my system having this:
# pkg-config --list-all | grep wayland
wayland-egl wayland-egl - Frontend wayland-egl library
wayland-cursor Wayland Cursor - Wayland cursor helper library
wayland-scanner Wayland Scanner - Wayland scanner
wayland-client Wayland Client - Wayland client side library
wayland-server Wayland Server - Server side implementation of the Wayland protocol
Two things surprise me:
- Why is wayland not detected?
- Why would gamepads not work, even though udev, dbus, etc, are all there?
By the way… the config.log has very little info on why Wayland would not be found:
configure:15572: checking for Wayland support
configure:15584: result: no