SDL3 Add DSU joystick driver
Introduces DSU client joystick support for SDL, enabling connection to DSU servers (such as DS4Windows and BetterJoy) to receive controller data over UDP, including motion sensors and touchpad data. Adds build system options, configuration hints, protocol implementation, and driver integration for Windows and other platforms.
FYI, this is failing CI.
The table-based CRC32 implementation here is directly equivalent to calling SDL_crc32() using 0 as the initial CRC.
The table-based CRC32 implementation here is directly equivalent to calling
SDL_crc32()using 0 as the initial CRC.
Please replace your CRC implementation with SDL_crc32()
Please merge SDL_dsujoystick_driver.c into SDL_dsujoystick.c. There's no need for these to be separate. The IN_JOYSTICK_DSU_ code in the header should probably be moved into the C file.
Overall this looks good. When you're ready you can remove the debug logging and move the remaining logging to SDL_LogWarn(SDL_LOG_CATEGORY_INPUT, ...)
I'll merge this once we start working on 3.6, so it has plenty of time to bake.
Cheers!
Oh, FYI the joystick system is designed so that you can add joysticks from another thread as needed. You don't need to queue up connected and disconnected joysticks, just make sure you call SDL_LockJoysticks() around adding and removing them.