Skip to content

Releases: libsdl-org/SDL

2.26.2

03 Jan 15:08
Compare
Choose a tag to compare

This is a stable bugfix release, with the following changes:

  • Fixed long delay at startup when a Razer keyboard is connected
  • Fixed not receiving SDLK_5 or SDL_SCANCODE_5 when using the AZERTY keyboard layout on Linux

2.26.1

01 Dec 20:33
Compare
Choose a tag to compare

This is a stable bugfix release, with the following changes:

  • Improved audio resampling quality
  • Fixed crash if SDL_GetPointDisplayIndex() or SDL_GetRectDisplayIndex() are called before SDL_VideoInit()
  • Fixed building with older Xcode and macOS SDK
  • Fixed building when not using shared Wayland libraries

2.26.0

22 Nov 00:28
Compare
Choose a tag to compare

In addition to lots of bug fixes, here are the major changes in this release:

General:

  • Updated OpenGL headers to the latest API from The Khronos Group Inc.
  • Added SDL_GetWindowSizeInPixels() to get the window size in pixels, which may differ from the window coordinate size for windows with high-DPI support
  • Added simulated vsync synchronization for the software renderer
  • Added the mouse position to SDL_MouseWheelEvent
  • Added SDL_ResetHints() to reset all hints to their default values
  • Added SDL_GetJoystickGUIDInfo() to get device information encoded in a joystick GUID
  • Added the hint SDL_HINT_JOYSTICK_HIDAPI_XBOX_360 to control whether the HIDAPI driver for XBox 360 controllers should be used
  • Added the hint SDL_HINT_JOYSTICK_HIDAPI_XBOX_360_PLAYER_LED to control whether the player LEDs should be lit to indicate which player is associated with an Xbox 360 controller
  • Added the hint SDL_HINT_JOYSTICK_HIDAPI_XBOX_360_WIRELESS to control whether the HIDAPI driver for XBox 360 wireless controllers should be used
  • Added the hint SDL_HINT_JOYSTICK_HIDAPI_XBOX_ONE to control whether the HIDAPI driver for XBox One controllers should be used
  • Added the hint SDL_HINT_JOYSTICK_HIDAPI_XBOX_ONE_HOME_LED to control the brightness of the XBox One guide button LED
  • Added support for PS3 controllers to the HIDAPI driver, enabled by default on macOS, controlled by the SDL_HINT_JOYSTICK_HIDAPI_PS3 hint
  • Added support for Nintendo Wii controllers to the HIDAPI driver, not enabled by default, controlled by the SDL_HINT_JOYSTICK_HIDAPI_WII hint
  • Added the hint SDL_HINT_JOYSTICK_HIDAPI_WII_PLAYER_LED to control whether the player LED should be lit on the Nintendo Wii controllers
  • Added the hint SDL_HINT_JOYSTICK_HIDAPI_VERTICAL_JOY_CONS to control whether Nintendo Switch Joy-Con controllers will be in vertical mode when using the HIDAPI driver
  • Added access to the individual left and right gyro sensors of the combined Joy-Cons controller
  • Added a microsecond timestamp to SDL_SensorEvent and SDL_ControllerSensorEvent, when the hardware provides that information
  • Added SDL_SensorGetDataWithTimestamp() and SDL_GameControllerGetSensorDataWithTimestamp() to retrieve the last sensor data with the associated microsecond timestamp
  • Added the hint SDL_HINT_HIDAPI_IGNORE_DEVICES to have the SDL HID API ignore specific devices
  • SDL_GetRevision() now includes more information about the SDL build, including the git commit hash if available

Windows:

  • Added the hint SDL_HINT_MOUSE_RELATIVE_SYSTEM_SCALE to control whether the system mouse acceleration curve is used for relative mouse motion

macOS:

  • Implemented vsync synchronization on macOS 12

Linux:

  • Added SDL_SetPrimarySelectionText(), SDL_GetPrimarySelectionText(), and SDL_HasPrimarySelectionText() to interact with the X11 primary selection clipboard
  • Added the hint SDL_HINT_VIDEO_WAYLAND_EMULATE_MOUSE_WARP to control whether mouse pointer warp emulation is enabled under Wayland

Android:

  • Enabled IME soft keyboard input
  • Added version checking to make sure the SDL Java and C code are compatible

2.26.0 RC1

17 Nov 17:49
Compare
Choose a tag to compare
2.26.0 RC1 Pre-release
Pre-release

This is a release candidate for 2.26

In addition to lots of bug fixes, here are the major changes in this release:

General:

  • Updated OpenGL headers to the latest API from The Khronos Group Inc.
  • Added SDL_GetWindowSizeInPixels() to get the window size in pixels, which may differ from the window coordinate size for windows with high-DPI support
  • Added simulated vsync synchronization for the software renderer
  • Added the mouse position to SDL_MouseWheelEvent
  • Added SDL_ResetHints() to reset all hints to their default values
  • Added SDL_GetJoystickGUIDInfo() to get device information encoded in a joystick GUID
  • Added the hint SDL_HINT_JOYSTICK_HIDAPI_XBOX_360 to control whether the HIDAPI driver for XBox 360 controllers should be used
  • Added the hint SDL_HINT_JOYSTICK_HIDAPI_XBOX_360_PLAYER_LED to control whether the player LEDs should be lit to indicate which player is associated with an Xbox 360 controller
  • Added the hint SDL_HINT_JOYSTICK_HIDAPI_XBOX_360_WIRELESS to control whether the HIDAPI driver for XBox 360 wireless controllers should be used
  • Added the hint SDL_HINT_JOYSTICK_HIDAPI_XBOX_ONE to control whether the HIDAPI driver for XBox One controllers should be used
  • Added the hint SDL_HINT_JOYSTICK_HIDAPI_XBOX_ONE_HOME_LED to control the brightness of the XBox One guide button LED
  • Added support for PS3 controllers to the HIDAPI driver, enabled by default on macOS, controlled by the SDL_HINT_JOYSTICK_HIDAPI_PS3 hint
  • Added support for Nintendo Wii controllers to the HIDAPI driver, not enabled by default, controlled by the SDL_HINT_JOYSTICK_HIDAPI_WII hint
  • Added the hint SDL_HINT_JOYSTICK_HIDAPI_WII_PLAYER_LED to control whether the player LED should be lit on the Nintendo Wii controllers
  • Added the hint SDL_HINT_JOYSTICK_HIDAPI_VERTICAL_JOY_CONS to control whether Nintendo Switch Joy-Con controllers will be in vertical mode when using the HIDAPI driver
  • Added access to the individual left and right gyro sensors of the combined Joy-Cons controller
  • Added a microsecond timestamp to SDL_SensorEvent and SDL_ControllerSensorEvent, when the hardware provides that information
  • Added SDL_SensorGetDataWithTimestamp() and SDL_GameControllerGetSensorDataWithTimestamp() to retrieve the last sensor data with the associated microsecond timestamp
  • Added the hint SDL_HINT_HIDAPI_IGNORE_DEVICES to have the SDL HID API ignore specific devices
  • SDL_GetRevision() now includes more information about the SDL build, including the git commit hash if available

Windows:

  • Added the hint SDL_HINT_MOUSE_RELATIVE_SYSTEM_SCALE to control whether the system mouse acceleration curve is used for relative mouse motion

macOS:

  • Implemented vsync synchronization on macOS 12

Linux:

  • Added SDL_SetPrimarySelectionText(), SDL_GetPrimarySelectionText(), and SDL_HasPrimarySelectionText() to interact with the X11 primary selection clipboard
  • Added the hint SDL_HINT_VIDEO_WAYLAND_EMULATE_MOUSE_WARP to control whether mouse pointer warp emulation is enabled under Wayland

Android:

  • Enabled IME soft keyboard input
  • Added version checking to make sure the SDL Java and C code are compatible

2.24.2

01 Nov 13:39
Compare
Choose a tag to compare

This is a stable bugfix release, with the following changes:

Windows

  • Only check to see if the ICC profile changes when the display changes or we gain focus
  • Fixed window resize handing when using the D3D12 renderer
  • Fixed Xbox controller detection on Windows XP

macOS

  • Fixed long delay in SDL_CloseAudioDevice()

Linux

  • Fixed crash in Wayland_HasScreenKeyboardSupport()

FreeBSD

  • Fixed building without GNU sort, but warn that dynamic libraries won't be found

Emscripten

  • Fixed infinite recursion related to mutexes on startup

OS/2

  • Fixes and improvements to SDL_LoadObject() functionality

2.24.1

05 Oct 00:16
Compare
Choose a tag to compare

This is a stable bugfix release, with the following changes:

General

  • Fixed shader compilation issues using the OpenGL ES2 renderer
  • Fixed configure tests failing when using clang 15

Windows

  • Fixed running on Windows XP
  • Fixed invalid executables being created with mingw based compilers

macOS

  • Fixed new windows setting the SDL_WINDOW_BORDERLESS flag incorrectly
  • Fixed audio race condition on shutdown
  • Fixed crash if there are no input devices available

FreeBSD

  • Building requires GNU sort, which is now checked at configure time
  • Fixed building with libusb not dynamically loaded, enabling HIDAPI support

2.24.0

19 Aug 16:04
Compare
Choose a tag to compare

In addition to lots of bug fixes, here are the major changes in this release:

General:

  • New version numbering scheme, similar to GLib and Flatpak.
    • An even number in the minor version (second component) indicates a production-ready stable release such as 2.24.0, which would have been 2.0.24 under the old system.
      • The patchlevel (micro version, third component) indicates a bugfix-only update: for example, 2.24.1 would be a bugfix-only release to fix bugs in 2.24.0, without adding new features.
    • An odd number in the minor version indicates a prerelease such as 2.23.0. Stable distributions should not use these prereleases.
      • The patchlevel indicates successive prereleases, for example 2.23.1 and 2.23.2 would be prereleases during development of the SDL 2.24.0 stable release.
  • Added SDL_GetPointDisplayIndex() and SDL_GetRectDisplayIndex() to get the display associated with a point and rectangle in screen space
  • Added SDL_bsearch(), SDL_crc16(), and SDL_utf8strnlen() to the stdlib routines
  • Added SDL_CPUPauseInstruction() as a macro in SDL_atomic.h
  • Added SDL_size_mul_overflow() and SDL_size_add_overflow() for better size overflow protection
  • Added SDL_ResetHint() to reset a hint to the default value
  • Added SDL_ResetKeyboard() to reset SDL's internal keyboard state, generating key up events for all currently pressed keys
  • Added the hint SDL_HINT_MOUSE_RELATIVE_WARP_MOTION to control whether mouse warping generates motion events in relative mode. This hint defaults off.
  • Added the hint SDL_HINT_TRACKPAD_IS_TOUCH_ONLY to control whether trackpads are treated as touch devices or mice. By default touchpads are treated as mouse input.
  • The hint SDL_HINT_JOYSTICK_HIDAPI_JOY_CONS now defaults on
  • Added support for mini-gamepad mode for Nintendo Joy-Con controllers using the HIDAPI driver
  • Added the hint SDL_HINT_JOYSTICK_HIDAPI_COMBINE_JOY_CONS to control whether Joy-Con controllers are automatically merged into a unified gamepad when using the HIDAPI driver. This hint defaults on.
  • The hint SDL_HINT_JOYSTICK_HIDAPI_SWITCH_HOME_LED can be set to a floating point value to set the brightness of the Home LED on Nintendo Switch controllers
  • Added the hint SDL_HINT_JOYSTICK_HIDAPI_JOYCON_HOME_LED to set the Home LED brightness for the Nintendo Joy-Con controllers. By default the Home LED is not modified.
  • Added the hint SDL_HINT_JOYSTICK_HIDAPI_SWITCH_PLAYER_LED to control whether the player LED should be lit on the Nintendo Joy-Con controllers
  • Added support for Nintendo Online classic controllers using the HIDAPI driver
  • Added the hint SDL_HINT_JOYSTICK_HIDAPI_NINTENDO_CLASSIC to control whether the HIDAPI driver for Nintendo Online classic controllers should be used
  • Added support for the NVIDIA Shield Controller to the HIDAPI driver, supporting rumble and battery status
  • Added support for NVIDIA SHIELD controller to the HIDAPI driver, and a hint SDL_HINT_JOYSTICK_HIDAPI_SHIELD to control whether this is used
  • Added functions to get the platform dependent name for a joystick or game controller:
    • SDL_JoystickPathForIndex()
    • SDL_JoystickPath()
    • SDL_GameControllerPathForIndex()
    • SDL_GameControllerPath()
  • Added SDL_GameControllerGetFirmwareVersion() and SDL_JoystickGetFirmwareVersion(), currently implemented for DualSense(tm) Wireless Controllers using HIDAPI
  • Added SDL_JoystickAttachVirtualEx() for extended virtual controller support
  • Added joystick event SDL_JOYBATTERYUPDATED for when battery status changes
  • Added SDL_GUIDToString() and SDL_GUIDFromString() to convert between SDL GUID and string
  • Added SDL_HasLSX() and SDL_HasLASX() to detect LoongArch SIMD support
  • Added SDL_GetOriginalMemoryFunctions()
  • Added SDL_GetDefaultAudioInfo() to get the name and format of the default audio device, currently implemented for PipeWire, PulseAudio, WASAPI, and DirectSound
  • Added HIDAPI driver for the NVIDIA SHIELD controller (2017 model) to enable support for battery status and rumble
  • Added support for opening audio devices with 3 or 5 channels (2.1, 4.1). All channel counts from Mono to 7.1 are now supported.
  • Rewrote audio channel converters used by SDL_AudioCVT, based on the channel matrix coefficients used as the default for FAudio voices
  • SDL log messages are no longer limited to 4K and can be any length
  • Fixed a long-standing calling convention issue with dynapi affecting OpenWatcom or OS/2 builds

Windows:

  • Added initial support for building for Windows and Xbox with Microsoft's Game Development Kit (GDK), see docs/README-gdk.md for details
  • Added a D3D12 renderer implementation and SDL_RenderGetD3D12Device() to retrieve the D3D12 device associated with it
  • Added the hint SDL_HINT_WINDOWS_DPI_AWARENESS to set whether the application is DPI-aware. This hint must be set before initializing the video subsystem
  • Added the hint SDL_HINT_WINDOWS_DPI_SCALING to control whether the SDL coordinates are in DPI-scaled points or pixels
  • Added the hint SDL_HINT_DIRECTINPUT_ENABLED to control whether the DirectInput driver should be used
  • Added support for SDL_GetAudioDeviceSpec to the DirectSound backend

Linux:

  • Support for XVidMode has been removed, mode changes are only supported using the XRandR extension
  • Added the hint SDL_HINT_VIDEO_WAYLAND_MODE_EMULATION to control whether to expose a set of emulated modes in addition to the native resolution modes available on Wayland
  • Added the hint SDL_HINT_KMSDRM_DEVICE_INDEX to specify which KMSDRM device to use if the default is not desired
  • Added the hint SDL_HINT_LINUX_DIGITAL_HATS to control whether to treat hats as digital rather than checking to see if they may be analog
  • Added the hint SDL_HINT_LINUX_HAT_DEADZONES to control whether to use deadzones on analog hats

macOS:

  • Bumped minimum OS deployment version to macOS 10.9
  • Added SDL_GL_FLOATBUFFERS to allow Cocoa GL contexts to use EDR
  • Added the hint SDL_HINT_MAC_OPENGL_ASYNC_DISPATCH to control whether dispatching OpenGL context updates should block the dispatching thread until the main thread finishes processing. This hint defaults to blocking, which is the safer option on modern macOS.

2.0.22

25 Apr 19:20
53dea98
Compare
Choose a tag to compare

In addition to lots of bug fixes, here are the major changes in this release:

General:

  • Added SDL_RenderGetWindow() to get the window associated with a renderer
  • Added floating point rectangle functions:
    • SDL_PointInFRect()
    • SDL_FRectEmpty()
    • SDL_FRectEquals()
    • SDL_FRectEqualsEpsilon()
    • SDL_HasIntersectionF()
    • SDL_IntersectFRect()
    • SDL_UnionFRect()
    • SDL_EncloseFPoints()
    • SDL_IntersectFRectAndLine()
  • Added SDL_IsTextInputShown() which returns whether the IME window is currently shown
  • Added SDL_ClearComposition() to dismiss the composition window without disabling IME input
  • Added SDL_TEXTEDITING_EXT event for handling long composition text, and a hint SDL_HINT_IME_SUPPORT_EXTENDED_TEXT to enable it
  • Added the hint SDL_HINT_MOUSE_RELATIVE_MODE_CENTER to control whether the mouse should be constrained to the whole window or the center of the window when relative mode is enabled
  • The mouse is now automatically captured when mouse buttons are pressed, and the hint SDL_HINT_MOUSE_AUTO_CAPTURE allows you to control this behavior
  • Added the hint SDL_HINT_VIDEO_FOREIGN_WINDOW_OPENGL to let SDL know that a foreign window will be used with OpenGL
  • Added the hint SDL_HINT_VIDEO_FOREIGN_WINDOW_VULKAN to let SDL know that a foreign window will be used with Vulkan
  • Added the hint SDL_HINT_QUIT_ON_LAST_WINDOW_CLOSE to specify whether an SDL_QUIT event will be delivered when the last application window is closed
  • Added the hint SDL_HINT_JOYSTICK_ROG_CHAKRAM to control whether ROG Chakram mice show up as joysticks

Windows:

  • Added support for SDL_BLENDOPERATION_MINIMUM and SDL_BLENDOPERATION_MAXIMUM to the D3D9 renderer

Linux:

  • Compiling with Wayland support requires libwayland-client version 1.18.0 or later
  • Added the hint SDL_HINT_X11_WINDOW_TYPE to specify the _NET_WM_WINDOW_TYPE of SDL windows
  • Added the hint SDL_HINT_VIDEO_WAYLAND_PREFER_LIBDECOR to allow using libdecor with compositors that support xdg-decoration

Android:

  • Added SDL_AndroidSendMessage() to send a custom command to the SDL java activity

2.0.20

11 Jan 01:03
Compare
Choose a tag to compare

This is largely a bugfix release, with the following changes:

General:

  • SDL_RenderGeometryRaw() takes a pointer to SDL_Color, not int. You can cast color data in SDL_PIXELFORMAT_RGBA32 format (SDL_PIXELFORMAT_ABGR8888 on little endian systems) for this parameter.
  • Improved accuracy of horizontal and vertical line drawing when using OpenGL or OpenGLES
  • Added the hint SDL_HINT_RENDER_LINE_METHOD to control the method of line drawing used, to select speed, correctness, and compatibility.

Windows:

  • Fixed size of custom cursors

Linux:

  • Fixed hotplug controller detection, broken in 2.0.18

2.0.18

30 Nov 17:15
Compare
Choose a tag to compare

In addition to lots of bug fixes, here are the major changes in this release:

General:

  • The SDL wiki documentation and development headers are automatically kept in sync
  • Each function has information about in which version of SDL it was introduced
  • SDL-specific CMake options are now prefixed with 'SDL_'. Be sure to update your CMake build scripts accordingly!
  • Added the hint SDL_HINT_APP_NAME to let SDL know the name of your application for various places it might show up in system information
  • Added SDL_RenderGeometry() and SDL_RenderGeometryRaw() to allow rendering of arbitrary shapes using the SDL 2D render API
  • Added SDL_SetTextureUserData() and SDL_GetTextureUserData() to associate application data with an SDL texture
  • Added SDL_RenderWindowToLogical() and SDL_RenderLogicalToWindow() to convert between window coordinates and logical render coordinates
  • Added SDL_RenderSetVSync() to change whether a renderer present is synchronized with vblank at runtime
  • Added SDL_PremultiplyAlpha() to premultiply alpha on a block of SDL_PIXELFORMAT_ARGB8888 pixels
  • Added a window event SDL_WINDOWEVENT_DISPLAY_CHANGED which is sent when a window changes what display it's centered on
  • Added SDL_GetWindowICCProfile() to query a window's ICC profile, and a window event SDL_WINDOWEVENT_ICCPROF_CHANGED that is sent when it changes
  • Added the hint SDL_HINT_VIDEO_EGL_ALLOW_TRANSPARENCY to allow EGL windows to be transparent instead of opaque
  • SDL_WaitEvent() has been redesigned to use less CPU in most cases
  • Added SDL_SetWindowMouseRect() and SDL_GetWindowMouseRect() to confine the mouse cursor to an area of a window
  • You can now read precise mouse wheel motion using 'preciseX' and 'preciseY' event fields
  • Added SDL_GameControllerHasRumble() and SDL_GameControllerHasRumbleTriggers() to query whether a game controller supports rumble
  • Added SDL_JoystickHasRumble() and SDL_JoystickHasRumbleTriggers() to query whether a joystick supports rumble
  • SDL's hidapi implementation is now available as a public API in SDL_hidapi.h

Windows:

  • Improved relative mouse motion over Windows Remote Desktop
  • Added the hint SDL_HINT_IME_SHOW_UI to show native UI components instead of hiding them (defaults off)

Windows/UWP:

  • WGI is used instead of XInput for better controller support in UWP apps

Linux:

  • Added the hint SDL_HINT_SCREENSAVER_INHIBIT_ACTIVITY_NAME to set the activity that's displayed by the system when the screensaver is disabled
  • Added the hint SDL_HINT_LINUX_JOYSTICK_CLASSIC to control whether /dev/input/js* or /dev/input/event* are used as joystick devices
  • Added the hint SDL_HINT_JOYSTICK_DEVICE to allow the user to specify devices that will be opened in addition to the normal joystick detection
  • Added SDL_LinuxSetThreadPriorityAndPolicy() for more control over a thread priority on Linux

Android:

  • Added support for audio output and capture using AAudio on Android 8.1 and newer
  • Steam Controller support is disabled by default, and can be enabled by setting the hint SDL_HINT_JOYSTICK_HIDAPI_STEAM to "1" before calling SDL_Init()

Apple Arcade:

  • Added SDL_GameControllerGetAppleSFSymbolsNameForButton() and SDL_GameControllerGetAppleSFSymbolsNameForAxis() to support Apple Arcade titles

iOS:

  • Added documentation that the UIApplicationSupportsIndirectInputEvents key must be set to true in your application's Info.plist in order to get real Bluetooth mouse events.
  • Steam Controller support is disabled by default, and can be enabled by setting the hint SDL_HINT_JOYSTICK_HIDAPI_STEAM to "1" before calling SDL_Init()