SDL2 is the cross-platform development library for low-level access to audio, keyboard, mouse, joystick, and graphics hardware has a big new release out with SDL 2.0.16. This is the software that powers masses of games, game engines and more. It's a seriously vital bit of FOSS.
Here's the major feature changes as of this release:
General:
* Added SDL_FlashWindow() to get a user's attention
* Added SDL_GetAudioDeviceSpec() to get the preferred audio format of a device
* Added SDL_SetWindowAlwaysOnTop() to dynamically change the SDL_WINDOW_ALWAYS_ON_TOP flag for a window
* Added SDL_SetWindowKeyboardGrab() to support grabbing the keyboard independently of the mouse
* Added SDL_SoftStretchLinear() to do bilinear scaling between 32-bit software surfaces
* Added SDL_UpdateNVTexture() to update streaming NV12/21 textures
* Added SDL_GameControllerSendEffect() and SDL_JoystickSendEffect() to allow sending custom trigger effects to the DualSense controller
* Added SDL_GameControllerGetSensorDataRate() to get the sensor data rate for PlayStation and Nintendo Switch controllers
* Added support for the Amazon Luna
game controller
* Added rumble support for the Google Stadia controller using the HIDAPI driver
* Added SDL_GameControllerType constants for the Amazon Luna and Google Stadia controllers
* Added analog rumble for Nintendo Switch Pro controllers using the HIDAPI driver
* Reduced CPU usage when using SDL_WaitEvent() and SDL_WaitEventTimeout()Windows:
* Added SDL_SetWindowsMessageHook() to set a function that is called for all Windows messages
* Added SDL_RenderGetD3D11Device() to get the D3D11 device used by the SDL rendererLinux:
* Greatly improved Wayland support
* Added support for audio output and capture using Pipewire
* Added the hint SDL_HINT_AUDIO_INCLUDE_MONITORS to control whether PulseAudio recording should include monitor devices
* Added the hint SDL_HINT_AUDIO_DEVICE_STREAM_ROLE to describe the role of your application for audio control panelsAndroid:
* Added support for audio output and capture using AAudio
* Added SDL_AndroidShowToast() to show a lightweight
notificationiOS:
* Added support for mouse relative mode on iOS 14.1 and newer
* Added support for the Xbox Series X controllertvOS:
* Added support for the Xbox Series X controller
See more on the official site.
Developer Ethan Lee who has worked on SDL, FNA, FAudio and ported tons of games to both Linux and macOS did a bit of a write-up to go over some of the background details. It's worth noting that point 2 on Lee's list might now be solved by the NVIDIA 470.63.01 driver release that also went out today. Overall it sounds like proper Wayland support is still some time away for SDL2.
Because it's now far more urgent to support it properly
Does this refer to the Steam Deck? What is the connection?
From Ethan's write-up:
Because it's now far more urgent to support it properly
Does this refer to the Steam Deck? What is the connection?
Possibly. In a post back in May, Ethan remarks that "we're about to see a huge jump in Wayland use" soon. Gamescope uses Wayland, so I suppose it would be important for games to behave well with Wayland (though I don't know much about that). IIRC, May was also when rumors of a new Valve console started popping up. If millions of people are going to have Steam Decks, the support has to be there.
Aside from that, more and more distros are defaulting to Wayland. Even without the Steam Deck, Wayland is on an upward trajectory. It's nice to see. IMO it's time for Wayland to start being treated as the first choice.
Last edited by superboybot on 10 August 2021 at 5:21 pm UTC
I guess there must be some major hurdles and it's not straightforward.
So for games to benefit from this, does every single SDL game needs to incorporate this new version of SDL for that do happen? Or does it just needs the steam runtime SDL (or the one from the repos) to get updated?
Steam and distro updates are all that's needed for some of this. To use specific NEW features, games would have to use them directly but most of this stuff is a freebie.
See more from me