SDL 2.0.22 Media Library Release

The SDL 2.0.22 (Simple DirectMedia Layer) library, aimed at simplifying the writing of games and multimedia applications, has been released. The SDL library provides facilities such as hardware-accelerated 2D and 3D graphics output, input handling, audio playback, 3D output via OpenGL/OpenGL ES/Vulkan, and many other related operations. The library is written in C language and distributed under the Zlib license. To use SDL capabilities in projects in various programming languages, the necessary bindings are provided.

In the new release:

  • Improved support for the Wayland protocol. Initially, it was planned to switch to using the Wayland protocol by default in environments that provide simultaneous support for Wayland and X11, but due to problems associated with Wayland in games and NVIDIA drivers, it was decided to postpone the transition (in Wayland environments with the XWayland component, output from using the X11 protocol). To use Wayland, you can set the environment variable β€œSDL_VIDEODRIVER=wayland” before starting the application or add the function β€œSDL_SetHint(SDL_HINT_VIDEODRIVER, β€œwayland,x11”)” to the code before calling SDL_Init(). Compiling with Wayland requires at least libwayland-client version 1.18.0.
  • Added SDL_RenderGetWindow() function to get the window associated with the SDL Renderer.
  • Added a set of functions for manipulating rectangular areas (determining the occurrence of points, clearing, comparing, merging, etc.), operating with coordinates and sizes based on floating point numbers: SDL_PointInFRect(), SDL_FRectEmpty(), SDL_FRectEquals(), SDL_FRectEqualsEpsilon() , SDL_HasIntersectionF(), SDL_IntersectFRect(), SDL_UnionFRect(), SDL_EncloseFPoints() and SDL_IntersectFRectAndLine().
  • Added SDL_IsTextInputShown() function to check whether the text input area is shown.
  • Added SDL_ClearComposition() function to clear the text input area without disabling the input method (IME).
  • Added SDL_TEXTEDITING_EXT event to handle long text input areas and SDL_HINT_IME_SUPPORT_EXTENDED_TEXT flag to enable this event.
  • Added the SDL_HINT_MOUSE_RELATIVE_MODE_CENTER flag to enable restricting the mouse to only the center of the window instead of the entire window when relative mode is enabled.
  • Enabled automatic mouse capture when pressing mouse buttons. To disable it, the SDL_HINT_MOUSE_AUTO_CAPTURE flag is proposed.
  • Added SDL_HINT_VIDEO_FOREIGN_WINDOW_OPENGL and SDL_HINT_VIDEO_FOREIGN_WINDOW_VULKAN flags to convey information about the use of OpenGL or Vulkan in an external window.
  • Added the SDL_HINT_QUIT_ON_LAST_WINDOW_CLOSE flag to enable delivery of the SDL_QUIT event when the last application window is closed.
  • Added the SDL_HINT_JOYSTICK_ROG_CHAKRAM flag to treat the ROG Chakram mouse as a joystick.
  • For Linux, the SDL_HINT_X11_WINDOW_TYPE attribute has been added to set the _NET_WM_WINDOW_TYPE parameter to windows.
  • For Linux, the SDL_HINT_VIDEO_WAYLAND_PREFER_LIBDECOR flag has been added for using libdecor with composite servers that support xdg-decoration.
  • For Android, the SDL_AndroidSendMessage() function has been implemented to send an arbitrary command to the SDL Java handler.

Source: opennet.ru

Add a comment