Release of the multimedia library SDL 2.0.22

The release of the SDL 2.0.22 (Simple DirectMedia Layer) library has taken place, aimed at simplifying the creation of games and multimedia applications. The SDL library provides tools such as hardware-accelerated output for 2D and 3D graphics, input handling, sound playback, 3D rendering through OpenGL/OpenGL ES/Vulkan, and many other related operations. The library is written in C and is distributed under the Zlib license. To utilize SDL features in projects using 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 related issues with games and NVIDIA drivers, the transition has been postponed (in Wayland environments with the XWayland component, output using the X11 protocol is still applied as before). To use Wayland, you can set the environment variable ‘SDL_VIDEODRIVER=wayland’ before launching the application or add the function ‘SDL_SetHint(SDL_HINT_VIDEODRIVER, “wayland,x11”)’ in your code before calling SDL_Init(). To compile with Wayland, at least version 1.18.0 of libwayland-client is required.
  • Added the SDL_RenderGetWindow() function to retrieve the window associated with the SDL Renderer.
  • A set of functions for manipulating rectangular areas has been added (defining point inclusion, clearing, comparison, union, etc.), operating on 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 the SDL_IsTextInputShown() function to check whether the text input area is displayed.
  • Added the SDL_ClearComposition() function to clear the text input area without disabling the input method (IME).
  • Added the SDL_TEXTEDITING_EXT event for handling long text input areas and the SDL_HINT_IME_SUPPORT_EXTENDED_TEXT attribute to enable this event.
  • Added the SDL_HINT_MOUSE_RELATIVE_MODE_CENTER attribute to restrict the mouse only to the center of the window instead of the entire window when relative mode is enabled.
  • Automatic mouse capture has been enabled when mouse buttons are pressed. To disable this, the SDL_HINT_MOUSE_AUTO_CAPTURE attribute is suggested.
  • SDL_HINT_VIDEO_FOREIGN_WINDOW_OPENGL and SDL_HINT_VIDEO_FOREIGN_WINDOW_VULKAN have been added to convey information about the use of OpenGL or Vulkan in an external window.
  • SDL_HINT_QUIT_ON_LAST_WINDOW_CLOSE has been added to enable the delivery of SDL_QUIT event when the last window of the application is closed.
  • SDL_HINT_JOYSTICK_ROG_CHAKRAM has been added to handle the ROG Chakram mouse as a joystick.
  • For Linux, SDL_HINT_X11_WINDOW_TYPE has been added to set the _NET_WM_WINDOW_TYPE property for windows.
  • For Linux, SDL_HINT_VIDEO_WAYLAND_PREFER_LIBDECOR has been added to use libdecor with compositors servers, supporting xdg-decoration.
  • For Android, the function SDL_AndroidSendMessage() has been implemented to send arbitrary commands to the SDL Java handler.

Source: opennet.ru

Buy reliable website hosting with DDoS protection, VPS VDS servers 🔥 Buy reliable website hosting with DDoS protection, VPS VDS servers | ProHoster