SDL: Updated SDL_syswm.h for SDL 3.0

From b0840eb32e67861cfc803dc7eecae39008b4f783 Mon Sep 17 00:00:00 2001
From: Sam Lantinga <[EMAIL REDACTED]>
Date: Wed, 23 Nov 2022 13:33:48 -0800
Subject: [PATCH] Updated SDL_syswm.h for SDL 3.0

* The header is no longer dependent on SDL build configuration
* The structures are versioned separately from the rest of SDL
* SDL_GetWindowWMInfo() now returns a standard result code and is passed the version expected by the application
* Updated WhatsNew.txt and docs/ with the first API changes in SDL 3.0
 WhatsNew.txt                               | 848 +--------------------
 docs/                   |  24 +
 include/SDL_syswm.h                        | 190 ++---
 src/core/linux/SDL_fcitx.c                 |  36 +-
 src/core/linux/SDL_ibus.c                  |  36 +-
 src/dynapi/SDL_dynapi_overrides.h          |   1 -
 src/dynapi/SDL_dynapi_procs.h              |   1 -
 src/render/direct3d/SDL_render_d3d.c       |  13 +-
 src/render/direct3d11/SDL_render_d3d11.c   |  13 +-
 src/render/direct3d11/SDL_render_winrt.cpp |   9 +-
 src/render/direct3d12/SDL_render_d3d12.c   |  14 +-
 src/render/metal/SDL_render_metal.m        |  20 +-
 src/video/SDL_sysvideo.h                   |   3 +-
 src/video/SDL_video.c                      |  35 +-
 src/video/android/SDL_androidvulkan.c      |   2 +
 src/video/android/SDL_androidwindow.c      |  20 +-
 src/video/android/SDL_androidwindow.h      |   2 +-
 src/video/cocoa/SDL_cocoametalview.m       |   2 +
 src/video/cocoa/SDL_cocoavulkan.m          |   2 +
 src/video/cocoa/SDL_cocoawindow.h          |   2 +-
 src/video/cocoa/SDL_cocoawindow.m          |  21 +-
 src/video/haiku/SDL_BWin.h                 |   3 +-
 src/video/haiku/             |  18 +-
 src/video/haiku/SDL_bwindow.h              |   3 +-
 src/video/kmsdrm/SDL_kmsdrmvideo.c         |  18 +-
 src/video/kmsdrm/SDL_kmsdrmvideo.h         |   3 +-
 src/video/kmsdrm/SDL_kmsdrmvulkan.c        |  11 +-
 src/video/ngage/SDL_ngagewindow.h          |   1 +
 src/video/psp/SDL_pspvideo.c               |  26 +-
 src/video/psp/SDL_pspvideo.h               |   4 -
 src/video/raspberry/SDL_rpivideo.c         |  26 +-
 src/video/raspberry/SDL_rpivideo.h         |   4 -
 src/video/riscos/SDL_riscoswindow.c        |  16 +-
 src/video/riscos/SDL_riscoswindow.h        |   3 +-
 src/video/uikit/SDL_uikitmetalview.m       |   4 +-
 src/video/uikit/SDL_uikitvulkan.m          |   2 +
 src/video/uikit/SDL_uikitwindow.h          |   3 +-
 src/video/uikit/SDL_uikitwindow.m          |  56 +-
 src/video/vita/SDL_vitavideo.c             |  22 +-
 src/video/vita/SDL_vitavideo.h             |   4 -
 src/video/vivante/SDL_vivantevideo.c       |   3 +-
 src/video/vivante/SDL_vivantevideo.h       |   3 +-
 src/video/wayland/SDL_waylandvulkan.c      |   2 +
 src/video/wayland/SDL_waylandwindow.c      |  94 +--
 src/video/wayland/SDL_waylandwindow.h      |   7 +-
 src/video/windows/SDL_windowsevents.c      |   6 +-
 src/video/windows/SDL_windowsvulkan.c      |   2 +
 src/video/windows/SDL_windowswindow.c      |  29 +-
 src/video/windows/SDL_windowswindow.h      |   3 +-
 src/video/winrt/SDL_winrtvideo.cpp         |  29 +-
 src/video/x11/SDL_x11events.c              |   6 +-
 src/video/x11/SDL_x11window.c              |  28 +-
 src/video/x11/SDL_x11window.h              |   3 +-
 test/testautomation_syswm.c                |   9 +-
 test/testnative.h                          |   7 -
 test/testnativew32.c                       |   2 +
 test/testnativex11.c                       |   2 +
 57 files changed, 347 insertions(+), 1409 deletions(-)
 create mode 100644 docs/

diff --git a/WhatsNew.txt b/WhatsNew.txt
index 1f95f059257e..4231b8834182 100644
--- a/WhatsNew.txt
+++ b/WhatsNew.txt
@@ -2,852 +2,8 @@
 This is a list of major changes in SDL's version history.
-* 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
-* Added the hint SDL_HINT_MOUSE_RELATIVE_SYSTEM_SCALE to control whether the system mouse acceleration curve is used for relative mouse motion
-* Implemented vsync synchronization on macOS 12
-* 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
-* Enabled IME soft keyboard input
-* Added version checking to make sure the SDL Java and C code are compatible
-* 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
-* Added initial support for building for Windows and Xbox with Microsoft's Game Development Kit (GDK), see docs/ 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
-* 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
-* 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.
-* 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
-* 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
-* Added SDL_AndroidSendMessage() to send a custom command to the SDL java activity
-* 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
-* Fixed hotplug controller detection, broken in 2.0.18
-* 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
-* 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)
-* WGI is used instead of XInput for better controller support in UWP apps
-* 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
-* 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
-* 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()
-* 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()
-* 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
-* 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
-* Added SDL_AndroidShowToast() to show a lightweight notification
-* Added support for mouse relative mode on iOS 14.1 and newer
-* Added support for the Xbox Series X controller
-* Added support for the Xbox Series X controller
-* Added support for PS5 DualSense and Xbox Series X controllers to the HIDAPI controller driver
-* Added game controller button constants for paddles and new buttons
-* Added game controller functions to get additional information:
-	* SDL_GameControllerGetSerial()
-	* SDL_GameControllerHasAxis()
-	* SDL_GameControllerHasButton()
-	* SDL_GameControllerGetNumTouchpads()
-	* SDL_GameControllerGetNumTouchpadFingers()
-	* SDL_GameControllerGetTouchpadFinger()
-	* SDL_GameControllerHasSensor()
-	* SDL_GameControllerSetSensorEnabled()
-	* SDL_GameControllerIsSensorEnabled()
-	* SDL_GameControllerGetSensorData()
-	* SDL_GameControllerRumbleTriggers()
-	* SDL_GameControllerHasLED()
-	* SDL_GameControllerSetLED()
-* Added the hint SDL_HINT_JOYSTICK_HIDAPI_PS5 to control whether the HIDAPI driver for PS5 controllers should be used.
-* Added joystick functions to get additional information:
-	* SDL_JoystickGetSerial()
-	* SDL_JoystickRumbleTriggers()
-	* SDL_JoystickHasLED()
-	* SDL_JoystickSetLED()
-* Added an API to allow the application to create virtual joysticks:
-	* SDL_JoystickAttachVirtual()
-	* SDL_JoystickDetachVirtual()
-	* SDL_JoystickIsVirtual()
-	* SDL_JoystickSetVirtualAxis()
-	* SDL_JoystickSetVirtualButton()
-	* SDL_JoystickSetVirtualHat()
-* Added SDL_LockSensors() and SDL_UnlockSensors() to guarantee exclusive access to the sensor list
-* Added SDL_HAPTIC_STEERING_AXIS to play an effect on the steering wheel
-* Added the hint SDL_HINT_MOUSE_RELATIVE_SCALING to control whether relative motion is scaled by the screen DPI or renderer logical size
-* The default value for SDL_HINT_VIDEO_MINIMIZE_ON_FOCUS_LOSS is now false for better compatibility with modern window managers
-* Added SDL_GetPreferredLocales() to get the application's current locale setting
-* Added the hint SDL_HINT_PREFERRED_LOCALES to override your application's default locale setting
-* Added SDL_OpenURL() to open a URL in the system's default browser
-* Added SDL_HasSurfaceRLE() to tell whether a surface is currently using RLE encoding
-* Added SDL_SIMDRealloc() to reallocate memory obtained from SDL_SIMDAlloc()
-* Added SDL_GetErrorMsg() to get the last error in a thread-safe way
-* Added SDL_crc32(), SDL_wcscasecmp(), SDL_wcsncasecmp(), SDL_trunc(), SDL_truncf()
-* Added clearer names for RGB pixel formats, e.g. SDL_PIXELFORMAT_XRGB8888, SDL_PIXELFORMAT_XBGR8888, etc.
-* Added the RAWINPUT controller driver to support more than 4 Xbox controllers simultaneously
-* Added the hint SDL_HINT_JOYSTICK_RAWINPUT to control whether the RAWINPUT driver should be used
-* Added the hint SDL_HINT_JOYSTICK_HIDAPI_CORRELATE_XINPUT to control whether XInput and WGI should be used to for complete controller functionality with the RAWINPUT driver.
-* Added the SDL_WINDOW_METAL flag to specify that a window should be created with a Metal view
-* Added SDL_Metal_GetLayer() to get the CAMetalLayer backing a Metal view
-* Added SDL_Metal_GetDrawableSize() to get the size of a window's drawable, in pixels
-* Added the hint SDL_HINT_AUDIO_DEVICE_APP_NAME to specify the name that shows up in PulseAudio for your application
-* Added the hint SDL_HINT_AUDIO_DEVICE_STREAM_NAME to specify the name that shows up in PulseAudio associated with your audio stream
-* Added the hint SDL_HINT_LINUX_JOYSTICK_DEADZONES to control whether HID defined dead zones should be respected on Linux
-* Added the hint SDL_HINT_THREAD_PRIORITY_POLICY to specify the thread scheduler policy
-* Added the hint SDL_HINT_THREAD_FORCE_REALTIME_TIME_CRITICAL to allow time critical threads to use a realtime scheduling policy
-* Added SDL_AndroidRequestPermission() to request a specific system permission
-* Added the hint SDL_HINT_ANDROID_BLOCK_ON_PAUSE_PAUSEAUDIO to control whether audio will pause when the application goes intot he background
-* Added support for OS/2, see docs/ for details
-Emscripten (running in a web browser):
-* Added the hint SDL_HINT_EMSCRIPTEN_ASYNCIFY to control whether SDL should call emscripten_sleep internally
-* Added SDL_GetTextureScaleMode() and SDL_SetTextureScaleMode() to get and set the scaling mode used for a texture
-* Added SDL_LockTextureToSurface(), similar to SDL_LockTexture() but the locked area is exposed as a SDL surface.
-* Added new blend mode, SDL_BLENDMODE_MUL, which does a modulate and blend operation
-* Added the hint SDL_HINT_DISPLAY_USABLE_BOUNDS to override the results of SDL_GetDisplayUsableBounds() for display index 0.
-* Added the window underneath the finger to the SDL_TouchFingerEvent
-* Added SDL_GameControllerTypeForIndex(), SDL_GameControllerGetType() to return the type of a game controller (Xbox 360, Xbox One, PS3, PS4, or Nintendo Switch Pro)
-* Added the hint SDL_HINT_GAMECONTROLLERTYPE to override the automatic game controller type detection
-* Added SDL_JoystickFromPlayerIndex() and SDL_GameControllerFromPlayerIndex() to get the device associated with a player index
-* Added SDL_JoystickSetPlayerIndex() and SDL_GameControllerSetPlayerIndex() to set the player index associated with a device
-* Added the hint SDL_HINT_GAMECONTROLLER_USE_BUTTON_LABELS to specify whether Nintendo Switch Pro controllers should use the buttons as labeled or swapped to match positional layout. The default is to use the buttons as labeled.
-* Added support for Nintendo GameCube controllers to the HIDAPI driver, and a hint SDL_HINT_JOYSTICK_HIDAPI_GAMECUBE to control whether this is used.
-* Improved support for Xbox 360 and Xbox One controllers when using the HIDAPI driver
-* Added support for many game controllers, including:
-	* 8BitDo FC30 Pro
-	* 8BitDo M30 GamePad
-	* BDA PS4 Fightpad
-	* HORI Fighting Commander
-	* Hyperkin Duke
-	* Hyperkin X91
-	* MOGA XP5-A Plus
-	* NACON GC-400ES
-	* NVIDIA Controller v01.04
-	* PDP Versus Fighting Pad
-	* Razer Raion Fightpad for PS4
-	* Razer Serval
-	* Stadia Controller
-	* SteelSeries Stratus Duo
-	* Victrix Pro Fight Stick for PS4
-	* Xbox One Elite Series 2
-* Fixed blocking game controller rumble calls when using the HIDAPI driver
-* Added SDL_zeroa() macro to zero an array of elements
-* Added SDL_HasARMSIMD() which returns true if the CPU has ARM SIMD (ARMv6+) features
-* Fixed crash when using the release SDL DLL with applications built with gcc
-* Fixed performance regression in event handling introduced in 2.0.10
-* Added support for SDL_SetThreadPriority() for UWP applications
-* Added the hint SDL_HINT_VIDEO_X11_WINDOW_VISUALID to specify the visual chosen for new X11 windows
-* Added the hint SDL_HINT_VIDEO_X11_FORCE_EGL to specify whether X11 should use GLX or EGL by default
-iOS / tvOS / macOS:
-* Added SDL_Metal_CreateView() and SDL_Metal_DestroyView() to create CAMetalLayer-backed NSView/UIView and attach it to the specified window.
-iOS/ tvOS:
-* Added support for Bluetooth Steam Controllers as game controllers
-* Fixed support for surround sound on Apple TV
-* Added SDL_GetAndroidSDKVersion() to return the API level of the current device
-* Added support for audio capture using OpenSL-ES
-* Added support for Bluetooth Steam Controllers as game controllers
-* Fixed rare crashes when the app goes into the background or terminates
-* The SDL_RW* macros have been turned into functions that are available only in 2.0.10 and onward
-* Added SDL_SIMDGetAlignment(), SDL_SIMDAlloc(), and SDL_SIMDFree(), to allocate memory aligned for SIMD operations for the current CPU
-* Added SDL_RenderDrawPointF(), SDL_RenderDrawPointsF(), SDL_RenderDrawLineF(), SDL_RenderDrawLinesF(), SDL_RenderDrawRectF(), SDL_RenderDrawRectsF(), SDL_RenderFillRectF(), SDL_RenderFillRectsF(), SDL_RenderCopyF(), SDL_RenderCopyExF(), to allow floating point precision in the SDL rendering API.
-* Added SDL_GetTouchDeviceType() to get the type of a touch device, which can be a touch screen or a trackpad in relative or absolute coordinate mode.
-* The SDL rendering API now uses batched rendering by default, for improved performance
-* Added SDL_RenderFlush() to force batched render commands to execute, if you're going to mix SDL rendering with native rendering
-* Added the hint SDL_HINT_RENDER_BATCHING to control whether batching should be used for the rendering API. This defaults to "1" if you don't specify what rendering driver to use when creating the renderer.
-* Added the hint SDL_HINT_EVENT_LOGGING to enable logging of SDL events for debugging purposes
-* Added the hint SDL_HINT_GAMECONTROLLERCONFIG_FILE to specify a file that will be loaded at joystick initialization with game control

(Patch may be truncated, please check the link at the top of this post.)