What's new in Simple DirectMedia Layer 2.30.2

Apr 3, 2024
  • This is a stable bugfix release, with the following changes:
  • Fixed performance regression initializing controllers on Linux
  • Added support for the 6-button SEGA Mega Drive Control Pad for Nintendo Online
  • Added support for the MadCatz Saitek Side Panel Control Deck
  • Added support for the Hori Fighting Stick EX2
  • Added support for the Yawman Arrow flightstick
  • Added a gamepad mapping for the Defender Joystick Cobra R4
  • Fixed the gamepad mapping for the Sanwa Supply JY-P76USV controller
  • Poll for the initial controller state when using DirectInput
  • Allow using SDL_RWFromFile() with named pipes

New in Simple DirectMedia Layer 2.0.22 (Apr 26, 2022)

  • 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

New in Simple DirectMedia Layer 2.0.20 (Jan 11, 2022)

  • 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.
  • Fixed size of custom cursors

New in Simple DirectMedia Layer 2.0.18 (Nov 30, 2021)

  • 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
  • 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

New in Simple DirectMedia Layer 2.0.16 (Aug 11, 2021)

  • 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 renderer
  • Linux:
  • 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 panels
  • Android:
  • Added support for audio output and capture using AAudio
  • Added SDL_AndroidShowToast() to show a lightweight notification
  • iOS:
  • Added support for mouse relative mode on iOS 14.1 and newer
  • Added support for the Xbox Series X controller
  • tvOS:
  • Added support for the Xbox Series X controller

New in Simple DirectMedia Layer 2.0.9 (Nov 1, 2018)

  • General:
  • Added a new sensor API, initialized by passing SDL_INIT_SENSOR to SDL_Init(), and defined in SDL_sensor.h
  • Added an event SDL_SENSORUPDATE which is sent when a sensor is updated
  • Added SDL_GetDisplayOrientation() to return the current display orientation
  • Added an event SDL_DISPLAYEVENT which is sent when the display orientation changes
  • Added HIDAPI joystick drivers for more consistent support for Xbox, PS4 and Nintendo Switch Pro controller support across platforms. (Thanks to Valve for contributing the PS4 and Nintendo Switch Pro controller support)
  • Added support for many other popular game controllers
  • Added SDL_JoystickGetDevicePlayerIndex(), SDL_JoystickGetPlayerIndex(), and SDL_GameControllerGetPlayerIndex() to get the player index for a controller. For XInput controllers this returns the XInput index for the controller.
  • Added SDL_GameControllerRumble() and SDL_JoystickRumble() which allow simple rumble without using the haptics API
  • Added SDL_GameControllerMappingForDeviceIndex() to get the mapping for a controller before it’s opened
  • Added the hint SDL_HINT_MOUSE_DOUBLE_CLICK_TIME to control the mouse double-click time
  • Added the hint SDL_HINT_MOUSE_DOUBLE_CLICK_RADIUS to control the mouse double-click radius, in pixels
  • Added SDL_HasColorKey() to return whether a surface has a colorkey active
  • Added SDL_HasAVX512F() to return whether the CPU has AVX-512F features
  • Added SDL_IsTablet() to return whether the application is running on a tablet
  • Added SDL_THREAD_PRIORITY_TIME_CRITICAL for threads that must run at the highest priority
  • Mac OS X:
  • Fixed black screen at start on Mac OS X Mojave
  • Linux:
  • Added SDL_LinuxSetThreadPriority() to allow adjusting the thread priority of native threads using RealtimeKit if available.
  • iOS:
  • Fixed Asian IME input
  • Android:
  • Updated required Android SDK to API 26, to match Google’s new App Store requirements
  • Added support for wired USB Xbox, PS4, and Nintendo Switch Pro controllers
  • Added support for relative mouse mode on Android 7.0 and newer (except where it’s broken, on Chromebooks and when in DeX mode with Samsung Experience 9.0)
  • Added support for custom mouse cursors on Android 7.0 and newer
  • Added the hint SDL_HINT_ANDROID_TRAP_BACK_BUTTON to control whether the back button will back out of the app (the default) or be passed to the application as SDL_SCANCODE_AC_BACK
  • Added SDL_AndroidBackButton() to trigger the Android system back button behavior when handling the back button in the application
  • Added SDL_IsChromebook() to return whether the app is running in the Chromebook Android runtime
  • Added SDL_IsDeXMode() to return whether the app is running while docked in the Samsung DeX

New in Simple DirectMedia Layer 2.0.8 (Mar 2, 2018)

  • General:
  • Added SDL_fmod() and SDL_log10()
  • Each of the SDL math functions now has the corresponding float version
  • Added SDL_SetYUVConversionMode() and SDL_GetYUVConversionMode() to control the formula used when converting to and from YUV colorspace. The options are JPEG, BT.601, and BT.709
  • Windows:
  • Implemented WASAPI support on Windows UWP and removed the deprecated XAudio2 implementation
  • Added resampling support on WASAPI on Windows 7 and above
  • Windows UWP:
  • Added SDL_WinRTGetDeviceFamily() to find out what type of device your application is running on

New in Simple DirectMedia Layer 2.0.7 (Oct 24, 2017)

  • Added functions to query and set the SDL memory allocation functions:
  • SDL_GetMemoryFunctions()
  • SDL_SetMemoryFunctions()
  • SDL_GetNumAllocations()
  • Added locking functions for multi-threaded access to the joystick and game controller
  • APIs:
  • SDL_LockJoysticks()
  • SDL_UnlockJoysticks()
  • The following functions are now thread-safe:
  • SDL_SetEventFilter()
  • SDL_GetEventFilter()
  • SDL_AddEventWatch()
  • SDL_DelEventWatch()

New in Simple DirectMedia Layer 2.0.6 (Oct 3, 2017)

  • General:
  • Added cross-platform Vulkan graphics support in SDL_vulkan.h
  • SDL_Vulkan_LoadLibrary()
  • SDL_Vulkan_GetVkGetInstanceProcAddr()
  • SDL_Vulkan_GetInstanceExtensions()
  • SDL_Vulkan_CreateSurface()
  • SDL_Vulkan_GetDrawableSize()
  • SDL_Vulkan_UnloadLibrary()
  • This is all the platform-specific code you need to bring up Vulkan on all SDL platforms. You can look at an example in test/testvulkan.c
  • Added SDL_ComposeCustomBlendMode() to create custom blend modes for 2D rendering
  • Added SDL_HasNEON() which returns whether the CPU has NEON instruction support
  • Added support for many game controllers, including the Nintendo Switch Pro Controller
  • Added support for inverted axes and separate axis directions in game controller mappings
  • Added functions to return information about a joystick before it’s opened:
  • SDL_JoystickGetDeviceVendor()
  • SDL_JoystickGetDeviceProduct()
  • SDL_JoystickGetDeviceProductVersion()
  • SDL_JoystickGetDeviceType()
  • SDL_JoystickGetDeviceInstanceID()
  • Added functions to return information about an open joystick:
  • SDL_JoystickGetVendor()
  • SDL_JoystickGetProduct()
  • SDL_JoystickGetProductVersion()
  • SDL_JoystickGetType()
  • SDL_JoystickGetAxisInitialState()
  • Added functions to return information about an open game controller:
  • SDL_GameControllerGetVendor()
  • SDL_GameControllerGetProduct()
  • SDL_GameControllerGetProductVersion()
  • Added SDL_GameControllerNumMappings() and SDL_GameControllerMappingForIndex() to be able to enumerate the built-in game controller mappings
  • Added SDL_LoadFile() and SDL_LoadFile_RW() to load a file into memory
  • Added SDL_DuplicateSurface() to make a copy of a surface
  • Added an experimental JACK audio driver
  • Implemented non-power-of-two audio resampling, optionally using libsamplerate to perform the resampling
  • Added the hint SDL_HINT_AUDIO_RESAMPLING_MODE to control the quality of resampling
  • Added the hint SDL_HINT_RENDER_LOGICAL_SIZE_MODE to control the scaling policy for SDL_RenderSetLogicalSize():
  • “0” or “letterbox” - Uses letterbox/sidebars to fit the entire rendering on screen (the default)
  • “1” or “overscan” - Will zoom the rendering so it fills the entire screen, allowing edges to be drawn offscreen
  • Added the hints SDL_HINT_MOUSE_NORMAL_SPEED_SCALE and SDL_HINT_MOUSE_RELATIVE_SPEED_SCALE to scale the mouse speed when being read from raw mouse input
  • Added the hint SDL_HINT_TOUCH_MOUSE_EVENTS to control whether SDL will synthesize mouse events from touch events
  • Windows:
  • The new default audio driver on Windows is WASAPI and supports hot-plugging devices and changing the default audio device
  • The old XAudio2 audio driver is deprecated and will be removed in the next release
  • Added hints SDL_HINT_WINDOWS_INTRESOURCE_ICON and SDL_HINT_WINDOWS_INTRESOURCE_ICON_SMALL to specify a custom icon resource ID for SDL windows
  • The hint SDL_HINT_WINDOWS_DISABLE_THREAD_NAMING is now on by default for compatibility with .NET languages and various Windows debuggers
  • Updated the GUID format for game controller mappings, older mappings will be automatically converted on load
  • Implemented the SDL_WINDOW_ALWAYS_ON_TOP flag on Windows

New in Simple DirectMedia Layer 2.0.2 (Mar 10, 2014)

  • General:
  • Added SDL_GL_ResetAttributes() to reset OpenGL attributes to default values
  • Added an API to load a database of game controller mappings from a file:
  • SDL_GameControllerAddMappingsFromFile(), SDL_GameControllerAddMappingsFromRW()
  • Added game controller mappings for the PS4 and OUYA controllers
  • Added SDL_GetDefaultAssertionHandler() and SDL_GetAssertionHandler()
  • Added SDL_DetachThread()
  • Added SDL_HasAVX() to determine if the CPU has AVX features
  • Added SDL_vsscanf(), SDL_acos(), and SDL_asin() to the stdlib routines
  • EGL can now create/manage OpenGL and OpenGL ES 1.x/2.x contexts, and share
  • them using SDL_GL_SHARE_WITH_CURRENT_CONTEXT
  • Added a field "clicks" to the mouse button event which records whether the event is a single click, double click, etc.
  • The screensaver is now disabled by default, and there is a hint SDL_HINT_VIDEO_ALLOW_SCREENSAVER that can change that behavior.
  • Added a hint SDL_HINT_MOUSE_RELATIVE_MODE_WARP to specify whether mouse relative mode should be emulated using mouse warping.
  • testgl2 does not need to link with libGL anymore
  • Added testgles2 test program to demonstrate working with OpenGL ES 2.0
  • Added controllermap test program to visually map a game controller
  • Windows:
  • Support for OpenGL ES 2.x contexts using either WGL or EGL (natively via
  • the driver or emulated through ANGLE)
  • Added a hint SDL_HINT_VIDEO_WIN_D3DCOMPILER to specify which D3D shader compiler to use for OpenGL ES 2 support through ANGLE
  • Added a hint SDL_HINT_VIDEO_WINDOW_SHARE_PIXEL_FORMAT that is useful when creating multiple windows that should share the same OpenGL context.
  • Added an event SDL_RENDER_TARGETS_RESET that is sent when D3D9 render targets are reset after the device has been restored.

New in Simple DirectMedia Layer 2.0.1 (Oct 25, 2013)

  • General:
  • Added an API to get common filesystem paths in SDL_filesystem.h: SDL_GetBasePath(), SDL_GetPrefPath()
  • Added an API to do optimized YV12 and IYUV texture updates: SDL_UpdateYUVTexture()
  • Added an API to get the amount of RAM on the system: SDL_GetSystemRAM()
  • Added a macro to perform timestamp comparisons with SDL_GetTicks(): SDL_TICKS_PASSED()
  • Dramatically improved OpenGL ES 2.0 rendering performance
  • Added OpenGL attribute SDL_GL_FRAMEBUFFER_SRGB_CAPABLE
  • Windows:
  • Created a static library configuration for the Visual Studio 2010 project
  • Added a hint to create the Direct3D device with support for multi-threading: SDL_HINT_RENDER_DIRECT3D_THREADSAFE
  • Added a function to get the D3D9 adapter index for a display: SDL_Direct3D9GetAdapterIndex()
  • Added a function to get the D3D9 device for a D3D9 renderer: SDL_RenderGetD3D9Device()
  • Fixed building SDL with the mingw32 toolchain (mingw-w64 is preferred)
  • Fixed crash when using two XInput controllers at the same time
  • Fixed detecting a mixture of XInput and DirectInput controllers
  • Fixed clearing a D3D render target larger than the window
  • Improved support for format specifiers in SDL_snprintf()

New in Simple DirectMedia Layer 2.0.0 (Aug 13, 2013)

  • Full 3D hardware acceleration
  • Support for OpenGL 3.0+ in various profiles (core, compatibility, debug, robust, etc)
  • Support for OpenGL ES
  • Support for multiple windows
  • Support for multiple displays
  • Support for multiple audio devices
  • Android and iOS support
  • Simple 2D rendering API that can use Direct3D, OpenGL, OpenGL ES, or software rendering behind the scenes
  • Force Feedback available on Windows, Mac OS X and Linux
  • XInput and XAudio2 support for Windows
  • Atomic operations
  • Power management (exposes battery life remaining, etc)
  • Shaped windows
  • 32-bit audio (int and float)
  • Simplified Game Controller API (the Joystick API is still here, too!)
  • Touch support (multitouch, gestures, etc)
  • Better fullscreen support
  • Better keyboard support (scancodes vs keycodes, etc).
  • Message boxes
  • Clipboard support
  • Basic Drag'n'Drop support
  • Proper unicode input and IME support
  • A really powerful assert macro
  • Lots of old annoyances from 1.2 are gone

New in Simple DirectMedia Layer 1.2.15 (May 10, 2013)

  • General Notes:
  • Fixed assembly register clobbering in CPU info routines
  • Fixed memory stomp when using stretch blit on large images
  • Fixed pixel corruption with overlapping blits
  • SDL_JOYSTICK_DEVICE can be a colon separated list of joystick devices
  • Disabled MMX blitters since they don't compile on modern compilers
  • Windows Notes:
  • Fixed SDL_GL_ACCELERATED_VISUAL handling
  • Fixed application state handling with ALT-Tab
  • Fixed occasional crash handling WM_ACTIVATEAPP in Direct X code
  • Fixed UTF-8 decoding of Russian characters