Skip to content

Add SDL3 Controller Support#18833

Draft
RobLoach wants to merge 3 commits intolibretro:masterfrom
RobLoach:sdl3-joypad
Draft

Add SDL3 Controller Support#18833
RobLoach wants to merge 3 commits intolibretro:masterfrom
RobLoach:sdl3-joypad

Conversation

@RobLoach
Copy link
Member

@RobLoach RobLoach commented Mar 15, 2026

This is initial support on SDL3 Controller support. Using SDL3 will mean disabling the other SDL drivers, since the APIs are not backwards compatible. I've split it into its own sdl3_joypad.c since the API is quite different than previous iterations.

TODO

References

Test

  1. Compile RetroArch with SDL3 support
    ./configure --enable-sdl3
    make
    ./retroarch --verbose
    
  2. Once in, switch the Controller driver to sdl3 (Menu > Input > Controller > sdl3)
  3. Restart to load up with the SDL3 Controller Driver

Comment on lines +1667 to +1672
ifeq ($(HAVE_SDL3), 1)
SDL3_CFLAGS = $(shell pkg-config sdl3 --cflags)
SDL3_LIBS = $(shell pkg-config sdl3 --libs)
DEF_FLAGS += $(SDL3_CFLAGS)
LIBS += $(SDL3_LIBS)
DEFINES += -DHAVE_SDL3
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This the right way to set these configurations? https://wiki.libsdl.org/SDL3/README-migration

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks correct to me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SDL3 Input Support

2 participants