-
Notifications
You must be signed in to change notification settings - Fork 141
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ruby: Update to SDL3 #1845
base: master
Are you sure you want to change the base?
ruby: Update to SDL3 #1845
Conversation
c9326e0
to
47192eb
Compare
CI on this PR has functional builds that use SDL3; testing is welcome. This branch currently fetches updated macOS and Windows dependencies from my fork of |
Testing on FreeBSD. Audio subsystem working fine so far. Input subsystem doesn't pick up my gamepad, |
Thanks for testing! Hopefully that can get figured out before long. Good to know. |
I pushed an update as we were enumerating devices wrong which could have caused your issue, probably worth retesting again. |
Thanks, unfortunately this doesn't fix the issue. I can reproduce the problem with a minimal C program which just initializes the Joystick subsystem and then uses |
Another user has just reported an issue with undetected gamepads on Windows upstream: libsdl-org/SDL#12347 |
I found the problems with the SDL3 port on FreeBSD. The build system doesn't pick up the installed dependencies and the libusb backend of the HIDAPI driver needs a small patch to work with FreeBSD's implementation of the libusb API. I submitted a patch to the maintainer. With these fixes the input system detects my gamepad and it's working fine now :) |
Got it; thanks for chasing those down. I'm sure we can wait a bit for that to be fixed. We may or may not also want to wait for the next SDL3 release so we don't ship the 8BitDo Micro regression, since some ares users could easily have that controller. For ares-deps on macOS and Windows we can discuss internally what to do; we could either ship an update that stays on SDL2, or just stay on the current ares-deps for the time being until the next SDL3 release. |
Draft status pending ares-deps update and further testing.
In the input subsystem, changes are mostly cosmetic with renamed functions and joystick enumeration being slightly different.
In the audio subsystem, there are somewhat more significant changes. Audio queues are replaced by audio streams. The conversation between the API and the host to get a desired buffer size proceeds differently; the only way to request a specific buffer size is now via an SDL_HINT. It seems like the behavior here is quite platform-dependent. On macOS at least, it looks like we actually have more precise control over our buffer sizes with SDL3; buffer sizes no longer need be powers of 2. Performance seems to be fine; blocking behavior is somewhat different but not significantly.