diff --git a/MacOSX/SDL2.framework/Versions/A/Headers/SDL.h b/MacOSX/SDL2.framework/Versions/A/Headers/SDL.h index dcb6d20f..7cdd3243 100644 --- a/MacOSX/SDL2.framework/Versions/A/Headers/SDL.h +++ b/MacOSX/SDL2.framework/Versions/A/Headers/SDL.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2021 Sam Lantinga + Copyright (C) 1997-2022 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages diff --git a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_assert.h b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_assert.h index 4c209930..defadf13 100644 --- a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_assert.h +++ b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_assert.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2021 Sam Lantinga + Copyright (C) 1997-2022 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages diff --git a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_atomic.h b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_atomic.h index 1ca0ad0e..b29ceeac 100644 --- a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_atomic.h +++ b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_atomic.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2021 Sam Lantinga + Copyright (C) 1997-2022 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages diff --git a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_audio.h b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_audio.h index 7bfb2daa..ab25ec93 100644 --- a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_audio.h +++ b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_audio.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2021 Sam Lantinga + Copyright (C) 1997-2022 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages @@ -500,9 +500,7 @@ extern DECLSPEC const char *SDLCALL SDL_GetAudioDeviceName(int index, * hardware. * * `spec` will be filled with the sample rate, sample format, and channel - * count. All other values in the structure are filled with 0. When the - * supported struct members are 0, SDL was unable to get the property from the - * backend. + * count. * * \param index the index of the audio device; valid values range from 0 to * SDL_GetNumAudioDevices() - 1 diff --git a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_bits.h b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_bits.h index 1a7e95c6..22cb8531 100644 --- a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_bits.h +++ b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_bits.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2021 Sam Lantinga + Copyright (C) 1997-2022 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages diff --git a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_blendmode.h b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_blendmode.h index 84e3653a..08c9f9dd 100644 --- a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_blendmode.h +++ b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_blendmode.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2021 Sam Lantinga + Copyright (C) 1997-2022 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages @@ -67,9 +67,8 @@ typedef enum SDL_BLENDOPERATION_ADD = 0x1, /**< dst + src: supported by all renderers */ SDL_BLENDOPERATION_SUBTRACT = 0x2, /**< dst - src : supported by D3D9, D3D11, OpenGL, OpenGLES */ SDL_BLENDOPERATION_REV_SUBTRACT = 0x3, /**< src - dst : supported by D3D9, D3D11, OpenGL, OpenGLES */ - SDL_BLENDOPERATION_MINIMUM = 0x4, /**< min(dst, src) : supported by D3D11 */ - SDL_BLENDOPERATION_MAXIMUM = 0x5 /**< max(dst, src) : supported by D3D11 */ - + SDL_BLENDOPERATION_MINIMUM = 0x4, /**< min(dst, src) : supported by D3D9, D3D11 */ + SDL_BLENDOPERATION_MAXIMUM = 0x5 /**< max(dst, src) : supported by D3D9, D3D11 */ } SDL_BlendOperation; /** @@ -87,7 +86,6 @@ typedef enum SDL_BLENDFACTOR_ONE_MINUS_DST_COLOR = 0x8, /**< 1-dstR, 1-dstG, 1-dstB, 1-dstA */ SDL_BLENDFACTOR_DST_ALPHA = 0x9, /**< dstA, dstA, dstA, dstA */ SDL_BLENDFACTOR_ONE_MINUS_DST_ALPHA = 0xA /**< 1-dstA, 1-dstA, 1-dstA, 1-dstA */ - } SDL_BlendFactor; /** @@ -135,10 +133,10 @@ typedef enum * SDL 2.0.6. All renderers support the four blend modes listed in the * SDL_BlendMode enumeration. * - * - **direct3d**: Supports `SDL_BLENDOPERATION_ADD` with all factors. - * - **direct3d11**: Supports all operations with all factors. However, some + * - **direct3d**: Supports all operations with all factors. However, some * factors produce unexpected results with `SDL_BLENDOPERATION_MINIMUM` and * `SDL_BLENDOPERATION_MAXIMUM`. + * - **direct3d11**: Same as Direct3D 9. * - **opengl**: Supports the `SDL_BLENDOPERATION_ADD` operation with all * factors. OpenGL versions 1.1, 1.2, and 1.3 do not work correctly with SDL * 2.0.6. diff --git a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_clipboard.h b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_clipboard.h index 8a574ccb..93513630 100644 --- a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_clipboard.h +++ b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_clipboard.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2021 Sam Lantinga + Copyright (C) 1997-2022 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages diff --git a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_config.h b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_config.h index 13355ee9..7afefabe 100644 --- a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_config.h +++ b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_config.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2021 Sam Lantinga + Copyright (C) 1997-2022 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages @@ -39,8 +39,6 @@ #include "SDL_config_iphoneos.h" #elif defined(__ANDROID__) #include "SDL_config_android.h" -#elif defined(__PSP__) -#include "SDL_config_psp.h" #elif defined(__OS2__) #include "SDL_config_os2.h" #elif defined(__EMSCRIPTEN__) diff --git a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_config_macosx.h b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_config_macosx.h index 2a59959a..ff42e3d5 100644 --- a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_config_macosx.h +++ b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_config_macosx.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2021 Sam Lantinga + Copyright (C) 1997-2022 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages diff --git a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_cpuinfo.h b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_cpuinfo.h index 89cc7409..1fc40991 100644 --- a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_cpuinfo.h +++ b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_cpuinfo.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2021 Sam Lantinga + Copyright (C) 1997-2022 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages diff --git a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_endian.h b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_endian.h index d40e04fa..2866f4be 100644 --- a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_endian.h +++ b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_endian.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2021 Sam Lantinga + Copyright (C) 1997-2022 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages @@ -65,6 +65,15 @@ _m_prefetch(void *__P) #elif defined(__FreeBSD__) || defined(__NetBSD__) #include #define SDL_BYTEORDER BYTE_ORDER +/* predefs from newer gcc and clang versions: */ +#elif defined(__ORDER_LITTLE_ENDIAN__) && defined(__ORDER_BIG_ENDIAN__) && defined(__BYTE_ORDER__) +#if (__BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__) +#define SDL_BYTEORDER SDL_LIL_ENDIAN +#elif (__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__) +#define SDL_BYTEORDER SDL_BIG_ENDIAN +#else +#error Unsupported endianness +#endif /**/ #else #if defined(__hppa__) || \ defined(__m68k__) || defined(mc68000) || defined(_M_M68K) || \ diff --git a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_error.h b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_error.h index 33277c50..5c961e42 100644 --- a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_error.h +++ b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_error.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2021 Sam Lantinga + Copyright (C) 1997-2022 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages diff --git a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_events.h b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_events.h index 3c3b79d4..7e469070 100644 --- a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_events.h +++ b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_events.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2021 Sam Lantinga + Copyright (C) 1997-2022 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages @@ -102,6 +102,7 @@ typedef enum SDL_KEYMAPCHANGED, /**< Keymap changed due to a system event such as an input language or keyboard layout change. */ + SDL_TEXTEDITING_EXT, /**< Extended keyboard text editing (composition) */ /* Mouse events */ SDL_MOUSEMOTION = 0x400, /**< Mouse moved */ @@ -243,6 +244,19 @@ typedef struct SDL_TextEditingEvent Sint32 length; /**< The length of selected editing text */ } SDL_TextEditingEvent; +/** + * \brief Extended keyboard text editing event structure (event.editExt.*) when text would be + * truncated if stored in the text buffer SDL_TextEditingEvent + */ +typedef struct SDL_TextEditingExtEvent +{ + Uint32 type; /**< ::SDL_TEXTEDITING_EXT */ + Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */ + Uint32 windowID; /**< The window with keyboard focus, if any */ + char* text; /**< The editing text, which should be freed with SDL_free(), and will not be NULL */ + Sint32 start; /**< The start cursor of selected editing text */ + Sint32 length; /**< The length of selected editing text */ +} SDL_TextEditingExtEvent; #define SDL_TEXTINPUTEVENT_TEXT_SIZE (32) /** @@ -601,6 +615,7 @@ typedef union SDL_Event SDL_WindowEvent window; /**< Window event data */ SDL_KeyboardEvent key; /**< Keyboard event data */ SDL_TextEditingEvent edit; /**< Text editing event data */ + SDL_TextEditingExtEvent editExt; /**< Extended text editing event data */ SDL_TextInputEvent text; /**< Text input event data */ SDL_MouseMotionEvent motion; /**< Mouse motion event data */ SDL_MouseButtonEvent button; /**< Mouse button event data */ diff --git a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_filesystem.h b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_filesystem.h index ee9920fb..16f02e28 100644 --- a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_filesystem.h +++ b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_filesystem.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2021 Sam Lantinga + Copyright (C) 1997-2022 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages diff --git a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_gamecontroller.h b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_gamecontroller.h index 740dc656..54886108 100644 --- a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_gamecontroller.h +++ b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_gamecontroller.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2021 Sam Lantinga + Copyright (C) 1997-2022 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages @@ -869,8 +869,9 @@ extern DECLSPEC int SDLCALL SDL_GameControllerRumble(SDL_GameController *gamecon * calling it with 0 intensity stops any rumbling. * * Note that this is rumbling of the _triggers_ and not the game controller as - * a whole. The first controller to offer this feature was the PlayStation 5's - * DualShock 5. + * a whole. This is currently only supported on Xbox One controllers. If you + * want the (more common) whole-controller rumble, use + * SDL_GameControllerRumble() instead. * * \param gamecontroller The controller to vibrate * \param left_rumble The intensity of the left trigger rumble motor, from 0 diff --git a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_gesture.h b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_gesture.h index 530b3d57..e2caea2a 100644 --- a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_gesture.h +++ b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_gesture.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2021 Sam Lantinga + Copyright (C) 1997-2022 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages diff --git a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_haptic.h b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_haptic.h index 4fabba6b..f240ae92 100644 --- a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_haptic.h +++ b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_haptic.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2021 Sam Lantinga + Copyright (C) 1997-2022 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages diff --git a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_hidapi.h b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_hidapi.h index 6fdfbd40..354af5c5 100644 --- a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_hidapi.h +++ b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_hidapi.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2021 Sam Lantinga + Copyright (C) 1997-2022 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages diff --git a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_hints.h b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_hints.h index 87242879..12466e99 100644 --- a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_hints.h +++ b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_hints.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2021 Sam Lantinga + Copyright (C) 1997-2022 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages @@ -412,6 +412,19 @@ extern "C" { */ #define SDL_HINT_EVENT_LOGGING "SDL_EVENT_LOGGING" +/** + * \brief A variable controlling whether raising the window should be done more forcefully + * + * This variable can be set to the following values: + * "0" - No forcing (the default) + * "1" - Extra level of forcing + * + * At present, this is only an issue under MS Windows, which makes it nearly impossible to + * programmatically move a window to the foreground, for "security" reasons. See + * http://stackoverflow.com/a/34414846 for a discussion. + */ +#define SDL_HINT_FORCE_RAISEWINDOW "SDL_HINT_FORCE_RAISEWINDOW" + /** * \brief A variable controlling how 3D acceleration is used to accelerate the SDL screen surface. * @@ -566,6 +579,17 @@ extern "C" { */ #define SDL_HINT_IME_SHOW_UI "SDL_IME_SHOW_UI" +/** + * \brief A variable to control if extended IME text support is enabled. + * If enabled then SDL_TextEditingExtEvent will be issued if the text would be truncated otherwise. + * Additionally SDL_TextInputEvent will be dispatched multiple times so that it is not truncated. + * + * The variable can be set to the following values: + * "0" - Legacy behavior. Text can be truncated, no heap allocations. (default) + * "1" - Modern behavior. + */ +#define SDL_HINT_IME_SUPPORT_EXTENDED_TEXT "SDL_IME_SUPPORT_EXTENDED_TEXT" + /** * \brief A variable controlling whether the home indicator bar on iPhone X * should be hidden. @@ -612,6 +636,21 @@ extern "C" { */ #define SDL_HINT_JOYSTICK_HIDAPI_GAMECUBE "SDL_JOYSTICK_HIDAPI_GAMECUBE" +/** + * \brief A variable controlling whether "low_frequency_rumble" and "high_frequency_rumble" is used to implement + * the GameCube controller's 3 rumble modes, Stop(0), Rumble(1), and StopHard(2) + * this is useful for applications that need full compatibility for things like ADSR envelopes. + * Stop is implemented by setting "low_frequency_rumble" to "0" and "high_frequency_rumble" ">0" + * Rumble is both at any arbitrary value, + * StopHard is implemented by setting both "low_frequency_rumble" and "high_frequency_rumble" to "0" + * + * This variable can be set to the following values: + * "0" - Normal rumble behavior is behavior is used (default) + * "1" - Proper GameCube controller rumble behavior is used + * + */ +#define SDL_HINT_JOYSTICK_GAMECUBE_RUMBLE_BRAKE "SDL_JOYSTICK_GAMECUBE_RUMBLE_BRAKE" + /** * \brief A variable controlling whether Switch Joy-Cons should be treated the same as Switch Pro Controllers when using the HIDAPI driver. * @@ -766,7 +805,6 @@ extern "C" { * This variable can be set to the following values: * "0" - RAWINPUT drivers are not used * "1" - RAWINPUT drivers are used (the default) - * */ #define SDL_HINT_JOYSTICK_RAWINPUT "SDL_JOYSTICK_RAWINPUT" @@ -783,6 +821,15 @@ extern "C" { */ #define SDL_HINT_JOYSTICK_RAWINPUT_CORRELATE_XINPUT "SDL_JOYSTICK_RAWINPUT_CORRELATE_XINPUT" + /** + * \brief A variable controlling whether the ROG Chakram mice should show up as joysticks + * + * This variable can be set to the following values: + * "0" - ROG Chakram mice do not show up as joysticks (the default) + * "1" - ROG Chakram mice show up as joysticks + */ +#define SDL_HINT_JOYSTICK_ROG_CHAKRAM "SDL_JOYSTICK_ROG_CHAKRAM" + /** * \brief A variable controlling whether a separate thread should be used * for handling joystick detection and raw input messages on Windows @@ -886,6 +933,22 @@ extern "C" { */ #define SDL_HINT_MOUSE_NORMAL_SPEED_SCALE "SDL_MOUSE_NORMAL_SPEED_SCALE" +/** + * \brief A variable controlling whether relative mouse mode constrains the mouse to the center of the window + * + * This variable can be set to the following values: + * "0" - Relative mouse mode constrains the mouse to the window + * "1" - Relative mouse mode constrains the mouse to the center of the window + * + * Constraining to the center of the window works better for FPS games and when the + * application is running over RDP. Constraining to the whole window works better + * for 2D games and increases the chance that the mouse will be in the correct + * position when using high DPI mice. + * + * By default SDL will constrain the mouse to the center of the window + */ +#define SDL_HINT_MOUSE_RELATIVE_MODE_CENTER "SDL_MOUSE_RELATIVE_MODE_CENTER" + /** * \brief A variable controlling whether relative mouse mode is implemented using mouse warping * @@ -922,6 +985,19 @@ extern "C" { */ #define SDL_HINT_MOUSE_TOUCH_EVENTS "SDL_MOUSE_TOUCH_EVENTS" +/** + * \brief A variable controlling whether the mouse is captured while mouse buttons are pressed + * + * This variable can be set to the following values: + * "0" - The mouse is not captured while mouse buttons are pressed + * "1" - The mouse is captured while mouse buttons are pressed + * + * By default the mouse is captured while mouse buttons are pressed so if the mouse is dragged + * outside the window, the application continues to receive mouse events until the button is + * released. + */ +#define SDL_HINT_MOUSE_AUTO_CAPTURE "SDL_MOUSE_AUTO_CAPTURE" + /** * \brief Tell SDL not to catch the SIGINT or SIGTERM signals. * @@ -1059,6 +1135,19 @@ extern "C" { */ #define SDL_HINT_RENDER_BATCHING "SDL_RENDER_BATCHING" +/** + * \brief A variable controlling how the 2D render API renders lines + * + * This variable can be set to the following values: + * "0" - Use the default line drawing method (Bresenham's line algorithm as of SDL 2.0.20) + * "1" - Use the driver point API using Bresenham's line algorithm (correct, draws many points) + * "2" - Use the driver line API (occasionally misses line endpoints based on hardware driver quirks, was the default before 2.0.20) + * "3" - Use the driver geometry API (correct, draws thicker diagonal lines) + * + * This variable should be set when the renderer is created. + */ +#define SDL_HINT_RENDER_LINE_METHOD "SDL_RENDER_LINE_METHOD" + /** * \brief A variable controlling whether to enable Direct3D 11+'s Debug Layer. * @@ -1265,6 +1354,18 @@ extern "C" { */ #define SDL_HINT_TOUCH_MOUSE_EVENTS "SDL_TOUCH_MOUSE_EVENTS" +/** + * \brief A variable controlling which touchpad should generate synthetic mouse events + * + * This variable can be set to the following values: + * "0" - Only front touchpad should generate mouse events. Default + * "1" - Only back touchpad should generate mouse events. + * "2" - Both touchpads should generate mouse events. + * + * By default SDL will generate mouse events for all touch devices + */ +#define SDL_HINT_VITA_TOUCH_MOUSE_DEVICE "SDL_HINT_VITA_TOUCH_MOUSE_DEVICE" + /** * \brief A variable controlling whether the Android / tvOS remotes * should be listed as joystick devices, instead of sending keyboard events. @@ -1393,6 +1494,28 @@ extern "C" { */ #define SDL_HINT_VIDEO_WINDOW_SHARE_PIXEL_FORMAT "SDL_VIDEO_WINDOW_SHARE_PIXEL_FORMAT" +/** + * \brief When calling SDL_CreateWindowFrom(), make the window compatible with OpenGL. + * + * This variable can be set to the following values: + * "0" - Don't add any graphics flags to the SDL_WindowFlags + * "1" - Add SDL_WINDOW_OPENGL to the SDL_WindowFlags + * + * By default SDL will not make the foreign window compatible with OpenGL. + */ +#define SDL_HINT_VIDEO_FOREIGN_WINDOW_OPENGL "SDL_VIDEO_FOREIGN_WINDOW_OPENGL" + +/** + * \brief When calling SDL_CreateWindowFrom(), make the window compatible with Vulkan. + * + * This variable can be set to the following values: + * "0" - Don't add any graphics flags to the SDL_WindowFlags + * "1" - Add SDL_WINDOW_VULKAN to the SDL_WindowFlags + * + * By default SDL will not make the foreign window compatible with Vulkan. + */ +#define SDL_HINT_VIDEO_FOREIGN_WINDOW_VULKAN "SDL_VIDEO_FOREIGN_WINDOW_VULKAN" + /** * \brief A variable specifying which shader compiler to preload when using the Chrome ANGLE binaries * @@ -1811,6 +1934,50 @@ extern "C" { */ #define SDL_HINT_AUDIO_INCLUDE_MONITORS "SDL_AUDIO_INCLUDE_MONITORS" +/** + * \brief A variable that forces X11 windows to create as a custom type. + * + * This is currently only used for X11 and ignored elsewhere. + * + * During SDL_CreateWindow, SDL uses the _NET_WM_WINDOW_TYPE X11 property + * to report to the window manager the type of window it wants to create. + * This might be set to various things if SDL_WINDOW_TOOLTIP or + * SDL_WINDOW_POPUP_MENU, etc, were specified. For "normal" windows that + * haven't set a specific type, this hint can be used to specify a custom + * type. For example, a dock window might set this to + * "_NET_WM_WINDOW_TYPE_DOCK". + * + * If not set or set to "", this hint is ignored. This hint must be set + * before the SDL_CreateWindow() call that it is intended to affect. + * + * This hint is available since SDL 2.0.22. + */ +#define SDL_HINT_X11_WINDOW_TYPE "SDL_X11_WINDOW_TYPE" + +/** + * \brief A variable that decides whether to send SDL_QUIT when closing the final window. + * + * By default, SDL sends an SDL_QUIT event when there is only one window + * and it receives an SDL_WINDOWEVENT_CLOSE event, under the assumption most + * apps would also take the loss of this window as a signal to terminate the + * program. + * + * However, it's not unreasonable in some cases to have the program continue + * to live on, perhaps to create new windows later. + * + * Changing this hint to "0" will cause SDL to not send an SDL_QUIT event + * when the final window is requesting to close. Note that in this case, + * there are still other legitimate reasons one might get an SDL_QUIT + * event: choosing "Quit" from the macOS menu bar, sending a SIGINT (ctrl-c) + * on Unix, etc. + * + * The default value is "1". This hint can be changed at any time. + * + * This hint is available since SDL 2.0.22. Before then, you always get + * an SDL_QUIT event when closing the final window. + */ +#define SDL_HINT_QUIT_ON_LAST_WINDOW_CLOSE "SDL_QUIT_ON_LAST_WINDOW_CLOSE" + /** * \brief An enumeration of hint priorities diff --git a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_joystick.h b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_joystick.h index ef99a656..07e2b156 100644 --- a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_joystick.h +++ b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_joystick.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2021 Sam Lantinga + Copyright (C) 1997-2022 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages @@ -829,9 +829,9 @@ extern DECLSPEC int SDLCALL SDL_JoystickRumble(SDL_Joystick *joystick, Uint16 lo * Each call to this function cancels any previous trigger rumble effect, and * calling it with 0 intensity stops any rumbling. * - * Note that this function is for _trigger_ rumble; the first joystick to - * support this was the PlayStation 5's DualShock 5 controller. If you want - * the (more common) whole-controller rumble, use SDL_JoystickRumble() + * Note that this is rumbling of the _triggers_ and not the game controller as + * a whole. This is currently only supported on Xbox One controllers. If you + * want the (more common) whole-controller rumble, use SDL_JoystickRumble() * instead. * * \param joystick The joystick to vibrate diff --git a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_keyboard.h b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_keyboard.h index 5b4fd91a..0aa59907 100644 --- a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_keyboard.h +++ b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_keyboard.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2021 Sam Lantinga + Copyright (C) 1997-2022 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages @@ -268,9 +268,30 @@ extern DECLSPEC SDL_bool SDLCALL SDL_IsTextInputActive(void); */ extern DECLSPEC void SDLCALL SDL_StopTextInput(void); +/** + * Dismiss the composition window/IME without disabling the subsystem. + * + * \since This function is available since SDL 2.0.22. + * + * \sa SDL_StartTextInput + * \sa SDL_StopTextInput + */ +extern DECLSPEC void SDLCALL SDL_ClearComposition(void); + +/** + * Returns if an IME Composite or Candidate window is currently shown. + * + * \since This function is available since SDL 2.0.22. + */ +extern DECLSPEC SDL_bool SDLCALL SDL_IsTextInputShown(void); + /** * Set the rectangle used to type Unicode text inputs. * + * Note: If you want use system native IME window, try to set hint + * **SDL_HINT_IME_SHOW_UI** to **1**, otherwise this function won't give you + * any feedback. + * * \param rect the SDL_Rect structure representing the rectangle to receive * text (ignored if NULL) * diff --git a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_keycode.h b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_keycode.h index 14a24e3d..35602541 100644 --- a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_keycode.h +++ b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_keycode.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2021 Sam Lantinga + Copyright (C) 1997-2022 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages diff --git a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_loadso.h b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_loadso.h index 837c53e5..61857c81 100644 --- a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_loadso.h +++ b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_loadso.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2021 Sam Lantinga + Copyright (C) 1997-2022 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages diff --git a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_locale.h b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_locale.h index 858c1c9a..75157799 100644 --- a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_locale.h +++ b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_locale.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2021 Sam Lantinga + Copyright (C) 1997-2022 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages diff --git a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_log.h b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_log.h index 14189129..dbbcb1e6 100644 --- a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_log.h +++ b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_log.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2021 Sam Lantinga + Copyright (C) 1997-2022 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages diff --git a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_main.h b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_main.h index ec78e414..b3fec15f 100644 --- a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_main.h +++ b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_main.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2021 Sam Lantinga + Copyright (C) 1997-2022 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages @@ -83,6 +83,15 @@ */ #define SDL_MAIN_NEEDED +#elif defined(__PSP__) +/* On PSP SDL provides a main function that sets the module info, + activates the GPU and starts the thread required to be able to exit + the software. + + If you provide this yourself, you may define SDL_MAIN_HANDLED + */ +#define SDL_MAIN_AVAILABLE + #endif #endif /* SDL_MAIN_HANDLED */ diff --git a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_messagebox.h b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_messagebox.h index 2731c925..d763534d 100644 --- a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_messagebox.h +++ b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_messagebox.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2021 Sam Lantinga + Copyright (C) 1997-2022 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages diff --git a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_metal.h b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_metal.h index bc72ca76..eb308287 100644 --- a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_metal.h +++ b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_metal.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2021 Sam Lantinga + Copyright (C) 1997-2022 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages @@ -92,6 +92,7 @@ extern DECLSPEC void *SDLCALL SDL_Metal_GetLayer(SDL_MetalView view); * * \param window SDL_Window from which the drawable size should be queried * \param w Pointer to variable for storing the width in pixels, may be NULL + * \param h Pointer to variable for storing the height in pixels, may be NULL * * \since This function is available since SDL 2.0.14. * diff --git a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_misc.h b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_misc.h index ff0fa952..261b6b87 100644 --- a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_misc.h +++ b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_misc.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2021 Sam Lantinga + Copyright (C) 1997-2022 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages diff --git a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_mouse.h b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_mouse.h index c41055f4..1d4a2db0 100644 --- a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_mouse.h +++ b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_mouse.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2021 Sam Lantinga + Copyright (C) 1997-2022 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages diff --git a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_mutex.h b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_mutex.h index 7b082089..173468f6 100644 --- a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_mutex.h +++ b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_mutex.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2021 Sam Lantinga + Copyright (C) 1997-2022 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages diff --git a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_name.h b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_name.h index 21e1b798..6ff35b46 100644 --- a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_name.h +++ b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_name.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2021 Sam Lantinga + Copyright (C) 1997-2022 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages diff --git a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_opengl.h b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_opengl.h index 95b51ae4..9aed5035 100644 --- a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_opengl.h +++ b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_opengl.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2021 Sam Lantinga + Copyright (C) 1997-2022 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages diff --git a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_opengles.h b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_opengles.h index 7ebf4cc6..8511b960 100644 --- a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_opengles.h +++ b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_opengles.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2021 Sam Lantinga + Copyright (C) 1997-2022 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages diff --git a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_opengles2.h b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_opengles2.h index 876e9651..172fcb3f 100644 --- a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_opengles2.h +++ b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_opengles2.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2021 Sam Lantinga + Copyright (C) 1997-2022 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages diff --git a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_pixels.h b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_pixels.h index fcfd649c..5d2c0c89 100644 --- a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_pixels.h +++ b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_pixels.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2021 Sam Lantinga + Copyright (C) 1997-2022 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages @@ -301,6 +301,11 @@ typedef enum SDL_DEFINE_PIXELFOURCC('O', 'E', 'S', ' ') } SDL_PixelFormatEnum; +/** + * The bits of this structure can be directly reinterpreted as an integer-packed + * color which uses the SDL_PIXELFORMAT_RGBA32 format (SDL_PIXELFORMAT_ABGR8888 + * on little-endian systems and SDL_PIXELFORMAT_RGBA8888 on big-endian systems). + */ typedef struct SDL_Color { Uint8 r; diff --git a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_platform.h b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_platform.h index 8dc0cbcb..79b8b6f4 100644 --- a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_platform.h +++ b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_platform.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2021 Sam Lantinga + Copyright (C) 1997-2022 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages diff --git a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_power.h b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_power.h index 1a484ee2..ecb3f4b0 100644 --- a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_power.h +++ b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_power.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2021 Sam Lantinga + Copyright (C) 1997-2022 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages diff --git a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_quit.h b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_quit.h index 28250500..4090f7f1 100644 --- a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_quit.h +++ b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_quit.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2021 Sam Lantinga + Copyright (C) 1997-2022 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages diff --git a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_rect.h b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_rect.h index cf639099..55a6473f 100644 --- a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_rect.h +++ b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_rect.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2021 Sam Lantinga + Copyright (C) 1997-2022 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages @@ -54,8 +54,13 @@ typedef struct SDL_Point /** * The structure that defines a point (floating point) * - * \sa SDL_EnclosePoints - * \sa SDL_PointInRect + * \sa SDL_FRectEmpty + * \sa SDL_FRectEquals + * \sa SDL_HasIntersectionF + * \sa SDL_IntersectFRect + * \sa SDL_UnionFRect + * \sa SDL_EncloseFPoints + * \sa SDL_PointInFRect */ typedef struct SDL_FPoint { @@ -213,6 +218,131 @@ extern DECLSPEC SDL_bool SDLCALL SDL_IntersectRectAndLine(const SDL_Rect * int *Y1, int *X2, int *Y2); + +/* SDL_FRect versions... */ + +/** + * Returns true if point resides inside a rectangle. + */ +SDL_FORCE_INLINE SDL_bool SDL_PointInFRect(const SDL_FPoint *p, const SDL_FRect *r) +{ + return ( (p->x >= r->x) && (p->x < (r->x + r->w)) && + (p->y >= r->y) && (p->y < (r->y + r->h)) ) ? SDL_TRUE : SDL_FALSE; +} + +/** + * Returns true if the rectangle has no area. + */ +SDL_FORCE_INLINE SDL_bool SDL_FRectEmpty(const SDL_FRect *r) +{ + return ((!r) || (r->w <= 0.0f) || (r->h <= 0.0f)) ? SDL_TRUE : SDL_FALSE; +} + +/** + * Returns true if the two rectangles are equal. + */ +SDL_FORCE_INLINE SDL_bool SDL_FRectEquals(const SDL_FRect *a, const SDL_FRect *b) +{ + return (a && b && (a->x == b->x) && (a->y == b->y) && + (a->w == b->w) && (a->h == b->h)) ? SDL_TRUE : SDL_FALSE; +} + +/** + * Determine whether two rectangles intersect with float precision. + * + * If either pointer is NULL the function will return SDL_FALSE. + * + * \param A an SDL_FRect structure representing the first rectangle + * \param B an SDL_FRect structure representing the second rectangle + * \returns SDL_TRUE if there is an intersection, SDL_FALSE otherwise. + * + * \since This function is available since SDL 2.0.22. + * + * \sa SDL_IntersectRect + */ +extern DECLSPEC SDL_bool SDLCALL SDL_HasIntersectionF(const SDL_FRect * A, + const SDL_FRect * B); + +/** + * Calculate the intersection of two rectangles with float precision. + * + * If `result` is NULL then this function will return SDL_FALSE. + * + * \param A an SDL_FRect structure representing the first rectangle + * \param B an SDL_FRect structure representing the second rectangle + * \param result an SDL_FRect structure filled in with the intersection of + * rectangles `A` and `B` + * \returns SDL_TRUE if there is an intersection, SDL_FALSE otherwise. + * + * \since This function is available since SDL 2.0.22. + * + * \sa SDL_HasIntersectionF + */ +extern DECLSPEC SDL_bool SDLCALL SDL_IntersectFRect(const SDL_FRect * A, + const SDL_FRect * B, + SDL_FRect * result); + +/** + * Calculate the union of two rectangles with float precision. + * + * \param A an SDL_FRect structure representing the first rectangle + * \param B an SDL_FRect structure representing the second rectangle + * \param result an SDL_FRect structure filled in with the union of rectangles + * `A` and `B` + * + * \since This function is available since SDL 2.0.22. + */ +extern DECLSPEC void SDLCALL SDL_UnionFRect(const SDL_FRect * A, + const SDL_FRect * B, + SDL_FRect * result); + +/** + * Calculate a minimal rectangle enclosing a set of points with float + * precision. + * + * If `clip` is not NULL then only points inside of the clipping rectangle are + * considered. + * + * \param points an array of SDL_FPoint structures representing points to be + * enclosed + * \param count the number of structures in the `points` array + * \param clip an SDL_FRect used for clipping or NULL to enclose all points + * \param result an SDL_FRect structure filled in with the minimal enclosing + * rectangle + * \returns SDL_TRUE if any points were enclosed or SDL_FALSE if all the + * points were outside of the clipping rectangle. + * + * \since This function is available since SDL 2.0.22. + */ +extern DECLSPEC SDL_bool SDLCALL SDL_EncloseFPoints(const SDL_FPoint * points, + int count, + const SDL_FRect * clip, + SDL_FRect * result); + +/** + * Calculate the intersection of a rectangle and line segment with float + * precision. + * + * This function is used to clip a line segment to a rectangle. A line segment + * contained entirely within the rectangle or that does not intersect will + * remain unchanged. A line segment that crosses the rectangle at either or + * both ends will be clipped to the boundary of the rectangle and the new + * coordinates saved in `X1`, `Y1`, `X2`, and/or `Y2` as necessary. + * + * \param rect an SDL_FRect structure representing the rectangle to intersect + * \param X1 a pointer to the starting X-coordinate of the line + * \param Y1 a pointer to the starting Y-coordinate of the line + * \param X2 a pointer to the ending X-coordinate of the line + * \param Y2 a pointer to the ending Y-coordinate of the line + * \returns SDL_TRUE if there is an intersection, SDL_FALSE otherwise. + * + * \since This function is available since SDL 2.0.22. + */ +extern DECLSPEC SDL_bool SDLCALL SDL_IntersectFRectAndLine(const SDL_FRect * + rect, float *X1, + float *Y1, float *X2, + float *Y2); + /* Ends C function definitions when using C++ */ #ifdef __cplusplus } diff --git a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_render.h b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_render.h index eed480b5..d859e3fd 100644 --- a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_render.h +++ b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_render.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2021 Sam Lantinga + Copyright (C) 1997-2022 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages @@ -261,6 +261,17 @@ extern DECLSPEC SDL_Renderer * SDLCALL SDL_CreateSoftwareRenderer(SDL_Surface * */ extern DECLSPEC SDL_Renderer * SDLCALL SDL_GetRenderer(SDL_Window * window); +/** + * Get the window associated with a renderer. + * + * \param renderer the renderer to query + * \returns the window on success or NULL on failure; call SDL_GetError() for + * more information. + * + * \since This function is available since SDL 2.0.22. + */ +extern DECLSPEC SDL_Window * SDLCALL SDL_RenderGetWindow(SDL_Renderer *renderer); + /** * Get information about a rendering context. * @@ -356,11 +367,15 @@ extern DECLSPEC SDL_Texture * SDLCALL SDL_CreateTextureFromSurface(SDL_Renderer * \param texture the texture to query * \param format a pointer filled in with the raw format of the texture; the * actual format may differ, but pixel transfers will use this - * format (one of the SDL_PixelFormatEnum values) + * format (one of the SDL_PixelFormatEnum values). This argument + * can be NULL if you don't need this information. * \param access a pointer filled in with the actual access to the texture - * (one of the SDL_TextureAccess values) - * \param w a pointer filled in with the width of the texture in pixels - * \param h a pointer filled in with the height of the texture in pixels + * (one of the SDL_TextureAccess values). This argument can be + * NULL if you don't need this information. + * \param w a pointer filled in with the width of the texture in pixels. This + * argument can be NULL if you don't need this information. + * \param h a pointer filled in with the height of the texture in pixels. This + * argument can be NULL if you don't need this information. * \returns 0 on success or a negative error code on failure; call * SDL_GetError() for more information. * @@ -1603,6 +1618,7 @@ extern DECLSPEC int SDLCALL SDL_RenderCopyExF(SDL_Renderer * renderer, * vertex array Color and alpha modulation is done per vertex * (SDL_SetTextureColorMod and SDL_SetTextureAlphaMod are ignored). * + * \param renderer The rendering context. * \param texture (optional) The SDL texture to use. * \param vertices Vertices. * \param num_vertices Number of vertices. @@ -1614,6 +1630,7 @@ extern DECLSPEC int SDLCALL SDL_RenderCopyExF(SDL_Renderer * renderer, * * \since This function is available since SDL 2.0.18. * + * \sa SDL_RenderGeometryRaw * \sa SDL_Vertex */ extern DECLSPEC int SDLCALL SDL_RenderGeometry(SDL_Renderer *renderer, @@ -1626,6 +1643,7 @@ extern DECLSPEC int SDLCALL SDL_RenderGeometry(SDL_Renderer *renderer, * vertex arrays Color and alpha modulation is done per vertex * (SDL_SetTextureColorMod and SDL_SetTextureAlphaMod are ignored). * + * \param renderer The rendering context. * \param texture (optional) The SDL texture to use. * \param xy Vertex positions * \param xy_stride Byte size to move from one element to the next element @@ -1641,11 +1659,14 @@ extern DECLSPEC int SDLCALL SDL_RenderGeometry(SDL_Renderer *renderer, * \return 0 on success, or -1 if the operation is not supported * * \since This function is available since SDL 2.0.18. + * + * \sa SDL_RenderGeometry + * \sa SDL_Vertex */ extern DECLSPEC int SDLCALL SDL_RenderGeometryRaw(SDL_Renderer *renderer, SDL_Texture *texture, const float *xy, int xy_stride, - const int *color, int color_stride, + const SDL_Color *color, int color_stride, const float *uv, int uv_stride, int num_vertices, const void *indices, int num_indices, int size_indices); @@ -1654,7 +1675,8 @@ extern DECLSPEC int SDLCALL SDL_RenderGeometryRaw(SDL_Renderer *renderer, * Read pixels from the current rendering target to an array of pixels. * * **WARNING**: This is a very slow operation, and should not be used - * frequently. + * frequently. If you're using this on the main rendering target, it should be + * called after rendering and before SDL_RenderPresent(). * * `pitch` specifies the number of bytes between rows in the destination * `pixels` data. This allows you to write to a subrectangle or have padded diff --git a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_revision.h b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_revision.h index 2d6b1c87..b7a8dbe6 100644 --- a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_revision.h +++ b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_revision.h @@ -1,2 +1,2 @@ -#define SDL_REVISION "https://github.com/libsdl-org/SDL.git@c2904c8ce70cb1c295740ab5d65d36d226ead11f" +#define SDL_REVISION "https://github.com/libsdl-org/SDL.git@505d6a4a052592b2676f87456c1f564daa8d2c50" #define SDL_REVISION_NUMBER 0 diff --git a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_rwops.h b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_rwops.h index 90afebd6..71e5c8db 100644 --- a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_rwops.h +++ b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_rwops.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2021 Sam Lantinga + Copyright (C) 1997-2022 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages diff --git a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_scancode.h b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_scancode.h index e54c1e00..5b2c67c8 100644 --- a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_scancode.h +++ b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_scancode.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2021 Sam Lantinga + Copyright (C) 1997-2022 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages diff --git a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_sensor.h b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_sensor.h index 243ca6d9..a2f30e0f 100644 --- a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_sensor.h +++ b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_sensor.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2021 Sam Lantinga + Copyright (C) 1997-2022 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages diff --git a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_shape.h b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_shape.h index 4b27204b..1bca9270 100644 --- a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_shape.h +++ b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_shape.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2021 Sam Lantinga + Copyright (C) 1997-2022 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages diff --git a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_stdinc.h b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_stdinc.h index 15a63544..6ddb9775 100644 --- a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_stdinc.h +++ b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_stdinc.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2021 Sam Lantinga + Copyright (C) 1997-2022 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages @@ -354,8 +354,14 @@ typedef uint64_t Uint64; #endif #endif /* SDL_DISABLE_ANALYZE_MACROS */ +#if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 201112L) +#define SDL_COMPILE_TIME_ASSERT(name, x) _Static_assert(x, #x) +#elif defined(__cplusplus) && (__cplusplus >= 201103L) +#define SDL_COMPILE_TIME_ASSERT(name, x) static_assert(x, #x) +#else /* universal, but may trigger -Wunused-local-typedefs */ #define SDL_COMPILE_TIME_ASSERT(name, x) \ typedef int SDL_compile_time_assert_ ## name[(x) * 2 - 1] +#endif /** \cond */ #ifndef DOXYGEN_SHOULD_IGNORE_THIS SDL_COMPILE_TIME_ASSERT(uint8, sizeof(Uint8) == 1); diff --git a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_surface.h b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_surface.h index 0b18fa00..44123761 100644 --- a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_surface.h +++ b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_surface.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2021 Sam Lantinga + Copyright (C) 1997-2022 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages diff --git a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_system.h b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_system.h index 937e622f..41563add 100644 --- a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_system.h +++ b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_system.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2021 Sam Lantinga + Copyright (C) 1997-2022 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages @@ -425,6 +425,18 @@ extern DECLSPEC SDL_bool SDLCALL SDL_AndroidRequestPermission(const char *permis */ extern DECLSPEC int SDLCALL SDL_AndroidShowToast(const char* message, int duration, int gravity, int xoffset, int yoffset); +/** + * Send a user command to SDLActivity. + * + * Override "boolean onUnhandledMessage(Message msg)" to handle the message. + * + * \param command user command that must be greater or equal to 0x8000 + * \param param user parameter + * + * \since This function is available since SDL 2.0.22. + */ +extern DECLSPEC int SDLCALL SDL_AndroidSendMessage(Uint32 command, int param); + #endif /* __ANDROID__ */ /* Platform specific functions for WinRT */ diff --git a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_syswm.h b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_syswm.h index d25efc14..f7cd670c 100644 --- a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_syswm.h +++ b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_syswm.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2021 Sam Lantinga + Copyright (C) 1997-2022 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages @@ -98,6 +98,10 @@ typedef struct _UIViewController UIViewController; typedef Uint32 GLuint; #endif +#if defined(SDL_VIDEO_VULKAN) || defined(SDL_VIDEO_METAL) +#define SDL_METALVIEW_TAG 255 +#endif + #if defined(SDL_VIDEO_DRIVER_ANDROID) typedef struct ANativeWindow ANativeWindow; typedef void *EGLSurface; diff --git a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_thread.h b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_thread.h index 10ec43b9..35e680dd 100644 --- a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_thread.h +++ b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_thread.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2021 Sam Lantinga + Copyright (C) 1997-2022 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages diff --git a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_timer.h b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_timer.h index 1315b5f9..62f81d42 100644 --- a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_timer.h +++ b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_timer.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2021 Sam Lantinga + Copyright (C) 1997-2022 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages diff --git a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_touch.h b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_touch.h index f9a8545b..95924135 100644 --- a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_touch.h +++ b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_touch.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2021 Sam Lantinga + Copyright (C) 1997-2022 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages @@ -95,6 +95,14 @@ extern DECLSPEC int SDLCALL SDL_GetNumTouchDevices(void); */ extern DECLSPEC SDL_TouchID SDLCALL SDL_GetTouchDevice(int index); +/** + * Get the touch device name as reported from the driver or NULL if the index + * is invalid. + * + * \since This function is available since SDL 2.0.22. + */ +extern DECLSPEC const char* SDLCALL SDL_GetTouchName(int index); + /** * Get the type of the given touch device. * diff --git a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_types.h b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_types.h index 4267f366..355fb501 100644 --- a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_types.h +++ b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_types.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2021 Sam Lantinga + Copyright (C) 1997-2022 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages diff --git a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_version.h b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_version.h index 949c6594..3df4e041 100644 --- a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_version.h +++ b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_version.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2021 Sam Lantinga + Copyright (C) 1997-2022 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages @@ -59,7 +59,7 @@ typedef struct SDL_version */ #define SDL_MAJOR_VERSION 2 #define SDL_MINOR_VERSION 0 -#define SDL_PATCHLEVEL 18 +#define SDL_PATCHLEVEL 22 /** * Macro to determine SDL version program was compiled against. diff --git a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_video.h b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_video.h index c1a9e1e7..c62e0891 100644 --- a/MacOSX/SDL2.framework/Versions/A/Headers/SDL_video.h +++ b/MacOSX/SDL2.framework/Versions/A/Headers/SDL_video.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2021 Sam Lantinga + Copyright (C) 1997-2022 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages @@ -1337,6 +1337,7 @@ extern DECLSPEC void SDLCALL SDL_SetWindowKeyboardGrab(SDL_Window * window, * Mouse grab confines the mouse cursor to the window. * * \param window The window for which the mouse grab mode should be set. + * \param grabbed This is SDL_TRUE to grab mouse, and SDL_FALSE to release. * * \since This function is available since SDL 2.0.16. * diff --git a/MacOSX/SDL2.framework/Versions/A/Headers/begin_code.h b/MacOSX/SDL2.framework/Versions/A/Headers/begin_code.h index 66010b66..b1b1a3a9 100644 --- a/MacOSX/SDL2.framework/Versions/A/Headers/begin_code.h +++ b/MacOSX/SDL2.framework/Versions/A/Headers/begin_code.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2021 Sam Lantinga + Copyright (C) 1997-2022 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages @@ -107,7 +107,7 @@ #ifdef __BORLANDC__ #pragma nopackwarning #endif -#ifdef _M_X64 +#ifdef _WIN64 /* Use 8-byte alignment on 64-bit architectures, so pointers are aligned */ #pragma pack(push,8) #else diff --git a/MacOSX/SDL2.framework/Versions/A/Headers/close_code.h b/MacOSX/SDL2.framework/Versions/A/Headers/close_code.h index c65a2162..dc73432f 100644 --- a/MacOSX/SDL2.framework/Versions/A/Headers/close_code.h +++ b/MacOSX/SDL2.framework/Versions/A/Headers/close_code.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2021 Sam Lantinga + Copyright (C) 1997-2022 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages diff --git a/MacOSX/SDL2.framework/Versions/A/Resources/Info.plist b/MacOSX/SDL2.framework/Versions/A/Resources/Info.plist index 1bf1e7ae..aad1ba19 100644 --- a/MacOSX/SDL2.framework/Versions/A/Resources/Info.plist +++ b/MacOSX/SDL2.framework/Versions/A/Resources/Info.plist @@ -3,7 +3,7 @@ BuildMachineOSBuild - 20G165 + 21E258 CFBundleDevelopmentRegion English CFBundleExecutable @@ -19,7 +19,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 2.0.18 + 2.0.22 CFBundleSignature SDLX CFBundleSupportedPlatforms @@ -27,23 +27,23 @@ MacOSX CFBundleVersion - 2.0.18 + 2.0.22 DTCompiler com.apple.compilers.llvm.clang.1_0 DTPlatformBuild - 13A1030d + 13E113 DTPlatformName macosx DTPlatformVersion - 12.0 + 12.3 DTSDKBuild - 21A344 + 21E226 DTSDKName - macosx12.0 + macosx12.3 DTXcode - 1310 + 1330 DTXcodeBuild - 13A1030d + 13E113 LSMinimumSystemVersion 10.6 diff --git a/MacOSX/SDL2.framework/Versions/A/Resources/License.txt b/MacOSX/SDL2.framework/Versions/A/Resources/License.txt index ca6cdf19..d2785a68 100644 --- a/MacOSX/SDL2.framework/Versions/A/Resources/License.txt +++ b/MacOSX/SDL2.framework/Versions/A/Resources/License.txt @@ -1,6 +1,6 @@ Simple DirectMedia Layer -Copyright (C) 1997-2021 Sam Lantinga +Copyright (C) 1997-2022 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages diff --git a/MacOSX/SDL2.framework/Versions/A/Resources/default.metallib b/MacOSX/SDL2.framework/Versions/A/Resources/default.metallib index a404be35..0aba653a 100644 Binary files a/MacOSX/SDL2.framework/Versions/A/Resources/default.metallib and b/MacOSX/SDL2.framework/Versions/A/Resources/default.metallib differ diff --git a/MacOSX/SDL2.framework/Versions/A/SDL2 b/MacOSX/SDL2.framework/Versions/A/SDL2 index 028bfc37..60ccebf2 100755 Binary files a/MacOSX/SDL2.framework/Versions/A/SDL2 and b/MacOSX/SDL2.framework/Versions/A/SDL2 differ diff --git a/Windows/SDL2/LICENSE.txt b/Windows/SDL2/LICENSE.txt index 969b8c13..728a3d70 100644 --- a/Windows/SDL2/LICENSE.txt +++ b/Windows/SDL2/LICENSE.txt @@ -1,4 +1,4 @@ -Copyright (C) 1997-2021 Sam Lantinga +Copyright (C) 1997-2022 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages diff --git a/Windows/SDL2/WhatsNew.txt b/Windows/SDL2/WhatsNew.txt index db477d35..612978a7 100644 --- a/Windows/SDL2/WhatsNew.txt +++ b/Windows/SDL2/WhatsNew.txt @@ -1,6 +1,57 @@ This is a list of major changes in SDL's version history. +--------------------------------------------------------------------------- +2.0.22: +--------------------------------------------------------------------------- + +General: +* Added SDL_RenderGetWindow() to get the window associated with a renderer +* Added floating point rectangle functions: + * SDL_PointInFRect() + * SDL_FRectEmpty() + * SDL_FRectEquals() + * 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: +* Added the hint SDL_HINT_X11_WINDOW_TYPE to specify the _NET_WM_WINDOW_TYPE of SDL windows + +Android: +* Added SDL_AndroidSendMessage() to send a custom command to the SDL java activity + + +--------------------------------------------------------------------------- +2.0.20: +--------------------------------------------------------------------------- + +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: --------------------------------------------------------------------------- diff --git a/Windows/SDL2/bin/sdl2-config b/Windows/SDL2/bin/sdl2-config index 1f102705..27897312 100755 --- a/Windows/SDL2/bin/sdl2-config +++ b/Windows/SDL2/bin/sdl2-config @@ -40,7 +40,7 @@ while test $# -gt 0; do lib_suffix=$optarg ;; --version) - echo 2.0.18 + echo 2.0.22 ;; --cflags) echo -I${prefix}/include -Dmain=SDL_main diff --git a/Windows/SDL2/include/SDL.h b/Windows/SDL2/include/SDL.h index dcb6d20f..7cdd3243 100644 --- a/Windows/SDL2/include/SDL.h +++ b/Windows/SDL2/include/SDL.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2021 Sam Lantinga + Copyright (C) 1997-2022 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages diff --git a/Windows/SDL2/include/SDL_assert.h b/Windows/SDL2/include/SDL_assert.h index 4c209930..defadf13 100644 --- a/Windows/SDL2/include/SDL_assert.h +++ b/Windows/SDL2/include/SDL_assert.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2021 Sam Lantinga + Copyright (C) 1997-2022 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages diff --git a/Windows/SDL2/include/SDL_atomic.h b/Windows/SDL2/include/SDL_atomic.h index 1ca0ad0e..b29ceeac 100644 --- a/Windows/SDL2/include/SDL_atomic.h +++ b/Windows/SDL2/include/SDL_atomic.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2021 Sam Lantinga + Copyright (C) 1997-2022 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages diff --git a/Windows/SDL2/include/SDL_audio.h b/Windows/SDL2/include/SDL_audio.h index 7bfb2daa..ab25ec93 100644 --- a/Windows/SDL2/include/SDL_audio.h +++ b/Windows/SDL2/include/SDL_audio.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2021 Sam Lantinga + Copyright (C) 1997-2022 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages @@ -500,9 +500,7 @@ extern DECLSPEC const char *SDLCALL SDL_GetAudioDeviceName(int index, * hardware. * * `spec` will be filled with the sample rate, sample format, and channel - * count. All other values in the structure are filled with 0. When the - * supported struct members are 0, SDL was unable to get the property from the - * backend. + * count. * * \param index the index of the audio device; valid values range from 0 to * SDL_GetNumAudioDevices() - 1 diff --git a/Windows/SDL2/include/SDL_bits.h b/Windows/SDL2/include/SDL_bits.h index 1a7e95c6..22cb8531 100644 --- a/Windows/SDL2/include/SDL_bits.h +++ b/Windows/SDL2/include/SDL_bits.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2021 Sam Lantinga + Copyright (C) 1997-2022 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages diff --git a/Windows/SDL2/include/SDL_blendmode.h b/Windows/SDL2/include/SDL_blendmode.h index 84e3653a..08c9f9dd 100644 --- a/Windows/SDL2/include/SDL_blendmode.h +++ b/Windows/SDL2/include/SDL_blendmode.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2021 Sam Lantinga + Copyright (C) 1997-2022 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages @@ -67,9 +67,8 @@ typedef enum SDL_BLENDOPERATION_ADD = 0x1, /**< dst + src: supported by all renderers */ SDL_BLENDOPERATION_SUBTRACT = 0x2, /**< dst - src : supported by D3D9, D3D11, OpenGL, OpenGLES */ SDL_BLENDOPERATION_REV_SUBTRACT = 0x3, /**< src - dst : supported by D3D9, D3D11, OpenGL, OpenGLES */ - SDL_BLENDOPERATION_MINIMUM = 0x4, /**< min(dst, src) : supported by D3D11 */ - SDL_BLENDOPERATION_MAXIMUM = 0x5 /**< max(dst, src) : supported by D3D11 */ - + SDL_BLENDOPERATION_MINIMUM = 0x4, /**< min(dst, src) : supported by D3D9, D3D11 */ + SDL_BLENDOPERATION_MAXIMUM = 0x5 /**< max(dst, src) : supported by D3D9, D3D11 */ } SDL_BlendOperation; /** @@ -87,7 +86,6 @@ typedef enum SDL_BLENDFACTOR_ONE_MINUS_DST_COLOR = 0x8, /**< 1-dstR, 1-dstG, 1-dstB, 1-dstA */ SDL_BLENDFACTOR_DST_ALPHA = 0x9, /**< dstA, dstA, dstA, dstA */ SDL_BLENDFACTOR_ONE_MINUS_DST_ALPHA = 0xA /**< 1-dstA, 1-dstA, 1-dstA, 1-dstA */ - } SDL_BlendFactor; /** @@ -135,10 +133,10 @@ typedef enum * SDL 2.0.6. All renderers support the four blend modes listed in the * SDL_BlendMode enumeration. * - * - **direct3d**: Supports `SDL_BLENDOPERATION_ADD` with all factors. - * - **direct3d11**: Supports all operations with all factors. However, some + * - **direct3d**: Supports all operations with all factors. However, some * factors produce unexpected results with `SDL_BLENDOPERATION_MINIMUM` and * `SDL_BLENDOPERATION_MAXIMUM`. + * - **direct3d11**: Same as Direct3D 9. * - **opengl**: Supports the `SDL_BLENDOPERATION_ADD` operation with all * factors. OpenGL versions 1.1, 1.2, and 1.3 do not work correctly with SDL * 2.0.6. diff --git a/Windows/SDL2/include/SDL_clipboard.h b/Windows/SDL2/include/SDL_clipboard.h index 8a574ccb..93513630 100644 --- a/Windows/SDL2/include/SDL_clipboard.h +++ b/Windows/SDL2/include/SDL_clipboard.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2021 Sam Lantinga + Copyright (C) 1997-2022 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages diff --git a/Windows/SDL2/include/SDL_config.h b/Windows/SDL2/include/SDL_config.h index 13355ee9..7afefabe 100644 --- a/Windows/SDL2/include/SDL_config.h +++ b/Windows/SDL2/include/SDL_config.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2021 Sam Lantinga + Copyright (C) 1997-2022 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages @@ -39,8 +39,6 @@ #include "SDL_config_iphoneos.h" #elif defined(__ANDROID__) #include "SDL_config_android.h" -#elif defined(__PSP__) -#include "SDL_config_psp.h" #elif defined(__OS2__) #include "SDL_config_os2.h" #elif defined(__EMSCRIPTEN__) diff --git a/Windows/SDL2/include/SDL_config_windows.h b/Windows/SDL2/include/SDL_config_windows.h index dac4b7d8..770b1903 100644 --- a/Windows/SDL2/include/SDL_config_windows.h +++ b/Windows/SDL2/include/SDL_config_windows.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2021 Sam Lantinga + Copyright (C) 1997-2022 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages @@ -90,6 +90,10 @@ typedef unsigned int uintptr_t; # define SIZEOF_VOIDP 4 #endif +#ifdef __clang__ +# define HAVE_GCC_ATOMICS 1 +#endif + #define HAVE_DDRAW_H 1 #define HAVE_DINPUT_H 1 #define HAVE_DSOUND_H 1 @@ -100,9 +104,11 @@ typedef unsigned int uintptr_t; #endif #if defined(_WIN32_MAXVER) && _WIN32_MAXVER >= 0x0602 /* Windows 8 SDK */ #define HAVE_D3D11_H 1 +#define HAVE_ROAPI_H 1 #endif #define HAVE_MMDEVICEAPI_H 1 #define HAVE_AUDIOCLIENT_H 1 +#define HAVE_TPCSHRD_H 1 #define HAVE_SENSORSAPI_H 1 #if (defined(_M_IX86) || defined(_M_X64) || defined(_M_AMD64)) && (defined(_MSC_VER) && _MSC_VER >= 1600) #define HAVE_IMMINTRIN_H 1 diff --git a/Windows/SDL2/include/SDL_cpuinfo.h b/Windows/SDL2/include/SDL_cpuinfo.h index 89cc7409..1fc40991 100644 --- a/Windows/SDL2/include/SDL_cpuinfo.h +++ b/Windows/SDL2/include/SDL_cpuinfo.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2021 Sam Lantinga + Copyright (C) 1997-2022 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages diff --git a/Windows/SDL2/include/SDL_egl.h b/Windows/SDL2/include/SDL_egl.h index 21962281..f90e27b2 100644 --- a/Windows/SDL2/include/SDL_egl.h +++ b/Windows/SDL2/include/SDL_egl.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2021 Sam Lantinga + Copyright (C) 1997-2022 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages diff --git a/Windows/SDL2/include/SDL_endian.h b/Windows/SDL2/include/SDL_endian.h index d40e04fa..2866f4be 100644 --- a/Windows/SDL2/include/SDL_endian.h +++ b/Windows/SDL2/include/SDL_endian.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2021 Sam Lantinga + Copyright (C) 1997-2022 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages @@ -65,6 +65,15 @@ _m_prefetch(void *__P) #elif defined(__FreeBSD__) || defined(__NetBSD__) #include #define SDL_BYTEORDER BYTE_ORDER +/* predefs from newer gcc and clang versions: */ +#elif defined(__ORDER_LITTLE_ENDIAN__) && defined(__ORDER_BIG_ENDIAN__) && defined(__BYTE_ORDER__) +#if (__BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__) +#define SDL_BYTEORDER SDL_LIL_ENDIAN +#elif (__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__) +#define SDL_BYTEORDER SDL_BIG_ENDIAN +#else +#error Unsupported endianness +#endif /**/ #else #if defined(__hppa__) || \ defined(__m68k__) || defined(mc68000) || defined(_M_M68K) || \ diff --git a/Windows/SDL2/include/SDL_error.h b/Windows/SDL2/include/SDL_error.h index 33277c50..5c961e42 100644 --- a/Windows/SDL2/include/SDL_error.h +++ b/Windows/SDL2/include/SDL_error.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2021 Sam Lantinga + Copyright (C) 1997-2022 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages diff --git a/Windows/SDL2/include/SDL_events.h b/Windows/SDL2/include/SDL_events.h index 3c3b79d4..7e469070 100644 --- a/Windows/SDL2/include/SDL_events.h +++ b/Windows/SDL2/include/SDL_events.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2021 Sam Lantinga + Copyright (C) 1997-2022 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages @@ -102,6 +102,7 @@ typedef enum SDL_KEYMAPCHANGED, /**< Keymap changed due to a system event such as an input language or keyboard layout change. */ + SDL_TEXTEDITING_EXT, /**< Extended keyboard text editing (composition) */ /* Mouse events */ SDL_MOUSEMOTION = 0x400, /**< Mouse moved */ @@ -243,6 +244,19 @@ typedef struct SDL_TextEditingEvent Sint32 length; /**< The length of selected editing text */ } SDL_TextEditingEvent; +/** + * \brief Extended keyboard text editing event structure (event.editExt.*) when text would be + * truncated if stored in the text buffer SDL_TextEditingEvent + */ +typedef struct SDL_TextEditingExtEvent +{ + Uint32 type; /**< ::SDL_TEXTEDITING_EXT */ + Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */ + Uint32 windowID; /**< The window with keyboard focus, if any */ + char* text; /**< The editing text, which should be freed with SDL_free(), and will not be NULL */ + Sint32 start; /**< The start cursor of selected editing text */ + Sint32 length; /**< The length of selected editing text */ +} SDL_TextEditingExtEvent; #define SDL_TEXTINPUTEVENT_TEXT_SIZE (32) /** @@ -601,6 +615,7 @@ typedef union SDL_Event SDL_WindowEvent window; /**< Window event data */ SDL_KeyboardEvent key; /**< Keyboard event data */ SDL_TextEditingEvent edit; /**< Text editing event data */ + SDL_TextEditingExtEvent editExt; /**< Extended text editing event data */ SDL_TextInputEvent text; /**< Text input event data */ SDL_MouseMotionEvent motion; /**< Mouse motion event data */ SDL_MouseButtonEvent button; /**< Mouse button event data */ diff --git a/Windows/SDL2/include/SDL_filesystem.h b/Windows/SDL2/include/SDL_filesystem.h index ee9920fb..16f02e28 100644 --- a/Windows/SDL2/include/SDL_filesystem.h +++ b/Windows/SDL2/include/SDL_filesystem.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2021 Sam Lantinga + Copyright (C) 1997-2022 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages diff --git a/Windows/SDL2/include/SDL_gamecontroller.h b/Windows/SDL2/include/SDL_gamecontroller.h index 740dc656..54886108 100644 --- a/Windows/SDL2/include/SDL_gamecontroller.h +++ b/Windows/SDL2/include/SDL_gamecontroller.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2021 Sam Lantinga + Copyright (C) 1997-2022 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages @@ -869,8 +869,9 @@ extern DECLSPEC int SDLCALL SDL_GameControllerRumble(SDL_GameController *gamecon * calling it with 0 intensity stops any rumbling. * * Note that this is rumbling of the _triggers_ and not the game controller as - * a whole. The first controller to offer this feature was the PlayStation 5's - * DualShock 5. + * a whole. This is currently only supported on Xbox One controllers. If you + * want the (more common) whole-controller rumble, use + * SDL_GameControllerRumble() instead. * * \param gamecontroller The controller to vibrate * \param left_rumble The intensity of the left trigger rumble motor, from 0 diff --git a/Windows/SDL2/include/SDL_gesture.h b/Windows/SDL2/include/SDL_gesture.h index 530b3d57..e2caea2a 100644 --- a/Windows/SDL2/include/SDL_gesture.h +++ b/Windows/SDL2/include/SDL_gesture.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2021 Sam Lantinga + Copyright (C) 1997-2022 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages diff --git a/Windows/SDL2/include/SDL_haptic.h b/Windows/SDL2/include/SDL_haptic.h index 4fabba6b..f240ae92 100644 --- a/Windows/SDL2/include/SDL_haptic.h +++ b/Windows/SDL2/include/SDL_haptic.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2021 Sam Lantinga + Copyright (C) 1997-2022 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages diff --git a/Windows/SDL2/include/SDL_hidapi.h b/Windows/SDL2/include/SDL_hidapi.h index 6fdfbd40..354af5c5 100644 --- a/Windows/SDL2/include/SDL_hidapi.h +++ b/Windows/SDL2/include/SDL_hidapi.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2021 Sam Lantinga + Copyright (C) 1997-2022 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages diff --git a/Windows/SDL2/include/SDL_hints.h b/Windows/SDL2/include/SDL_hints.h index 87242879..12466e99 100644 --- a/Windows/SDL2/include/SDL_hints.h +++ b/Windows/SDL2/include/SDL_hints.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2021 Sam Lantinga + Copyright (C) 1997-2022 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages @@ -412,6 +412,19 @@ extern "C" { */ #define SDL_HINT_EVENT_LOGGING "SDL_EVENT_LOGGING" +/** + * \brief A variable controlling whether raising the window should be done more forcefully + * + * This variable can be set to the following values: + * "0" - No forcing (the default) + * "1" - Extra level of forcing + * + * At present, this is only an issue under MS Windows, which makes it nearly impossible to + * programmatically move a window to the foreground, for "security" reasons. See + * http://stackoverflow.com/a/34414846 for a discussion. + */ +#define SDL_HINT_FORCE_RAISEWINDOW "SDL_HINT_FORCE_RAISEWINDOW" + /** * \brief A variable controlling how 3D acceleration is used to accelerate the SDL screen surface. * @@ -566,6 +579,17 @@ extern "C" { */ #define SDL_HINT_IME_SHOW_UI "SDL_IME_SHOW_UI" +/** + * \brief A variable to control if extended IME text support is enabled. + * If enabled then SDL_TextEditingExtEvent will be issued if the text would be truncated otherwise. + * Additionally SDL_TextInputEvent will be dispatched multiple times so that it is not truncated. + * + * The variable can be set to the following values: + * "0" - Legacy behavior. Text can be truncated, no heap allocations. (default) + * "1" - Modern behavior. + */ +#define SDL_HINT_IME_SUPPORT_EXTENDED_TEXT "SDL_IME_SUPPORT_EXTENDED_TEXT" + /** * \brief A variable controlling whether the home indicator bar on iPhone X * should be hidden. @@ -612,6 +636,21 @@ extern "C" { */ #define SDL_HINT_JOYSTICK_HIDAPI_GAMECUBE "SDL_JOYSTICK_HIDAPI_GAMECUBE" +/** + * \brief A variable controlling whether "low_frequency_rumble" and "high_frequency_rumble" is used to implement + * the GameCube controller's 3 rumble modes, Stop(0), Rumble(1), and StopHard(2) + * this is useful for applications that need full compatibility for things like ADSR envelopes. + * Stop is implemented by setting "low_frequency_rumble" to "0" and "high_frequency_rumble" ">0" + * Rumble is both at any arbitrary value, + * StopHard is implemented by setting both "low_frequency_rumble" and "high_frequency_rumble" to "0" + * + * This variable can be set to the following values: + * "0" - Normal rumble behavior is behavior is used (default) + * "1" - Proper GameCube controller rumble behavior is used + * + */ +#define SDL_HINT_JOYSTICK_GAMECUBE_RUMBLE_BRAKE "SDL_JOYSTICK_GAMECUBE_RUMBLE_BRAKE" + /** * \brief A variable controlling whether Switch Joy-Cons should be treated the same as Switch Pro Controllers when using the HIDAPI driver. * @@ -766,7 +805,6 @@ extern "C" { * This variable can be set to the following values: * "0" - RAWINPUT drivers are not used * "1" - RAWINPUT drivers are used (the default) - * */ #define SDL_HINT_JOYSTICK_RAWINPUT "SDL_JOYSTICK_RAWINPUT" @@ -783,6 +821,15 @@ extern "C" { */ #define SDL_HINT_JOYSTICK_RAWINPUT_CORRELATE_XINPUT "SDL_JOYSTICK_RAWINPUT_CORRELATE_XINPUT" + /** + * \brief A variable controlling whether the ROG Chakram mice should show up as joysticks + * + * This variable can be set to the following values: + * "0" - ROG Chakram mice do not show up as joysticks (the default) + * "1" - ROG Chakram mice show up as joysticks + */ +#define SDL_HINT_JOYSTICK_ROG_CHAKRAM "SDL_JOYSTICK_ROG_CHAKRAM" + /** * \brief A variable controlling whether a separate thread should be used * for handling joystick detection and raw input messages on Windows @@ -886,6 +933,22 @@ extern "C" { */ #define SDL_HINT_MOUSE_NORMAL_SPEED_SCALE "SDL_MOUSE_NORMAL_SPEED_SCALE" +/** + * \brief A variable controlling whether relative mouse mode constrains the mouse to the center of the window + * + * This variable can be set to the following values: + * "0" - Relative mouse mode constrains the mouse to the window + * "1" - Relative mouse mode constrains the mouse to the center of the window + * + * Constraining to the center of the window works better for FPS games and when the + * application is running over RDP. Constraining to the whole window works better + * for 2D games and increases the chance that the mouse will be in the correct + * position when using high DPI mice. + * + * By default SDL will constrain the mouse to the center of the window + */ +#define SDL_HINT_MOUSE_RELATIVE_MODE_CENTER "SDL_MOUSE_RELATIVE_MODE_CENTER" + /** * \brief A variable controlling whether relative mouse mode is implemented using mouse warping * @@ -922,6 +985,19 @@ extern "C" { */ #define SDL_HINT_MOUSE_TOUCH_EVENTS "SDL_MOUSE_TOUCH_EVENTS" +/** + * \brief A variable controlling whether the mouse is captured while mouse buttons are pressed + * + * This variable can be set to the following values: + * "0" - The mouse is not captured while mouse buttons are pressed + * "1" - The mouse is captured while mouse buttons are pressed + * + * By default the mouse is captured while mouse buttons are pressed so if the mouse is dragged + * outside the window, the application continues to receive mouse events until the button is + * released. + */ +#define SDL_HINT_MOUSE_AUTO_CAPTURE "SDL_MOUSE_AUTO_CAPTURE" + /** * \brief Tell SDL not to catch the SIGINT or SIGTERM signals. * @@ -1059,6 +1135,19 @@ extern "C" { */ #define SDL_HINT_RENDER_BATCHING "SDL_RENDER_BATCHING" +/** + * \brief A variable controlling how the 2D render API renders lines + * + * This variable can be set to the following values: + * "0" - Use the default line drawing method (Bresenham's line algorithm as of SDL 2.0.20) + * "1" - Use the driver point API using Bresenham's line algorithm (correct, draws many points) + * "2" - Use the driver line API (occasionally misses line endpoints based on hardware driver quirks, was the default before 2.0.20) + * "3" - Use the driver geometry API (correct, draws thicker diagonal lines) + * + * This variable should be set when the renderer is created. + */ +#define SDL_HINT_RENDER_LINE_METHOD "SDL_RENDER_LINE_METHOD" + /** * \brief A variable controlling whether to enable Direct3D 11+'s Debug Layer. * @@ -1265,6 +1354,18 @@ extern "C" { */ #define SDL_HINT_TOUCH_MOUSE_EVENTS "SDL_TOUCH_MOUSE_EVENTS" +/** + * \brief A variable controlling which touchpad should generate synthetic mouse events + * + * This variable can be set to the following values: + * "0" - Only front touchpad should generate mouse events. Default + * "1" - Only back touchpad should generate mouse events. + * "2" - Both touchpads should generate mouse events. + * + * By default SDL will generate mouse events for all touch devices + */ +#define SDL_HINT_VITA_TOUCH_MOUSE_DEVICE "SDL_HINT_VITA_TOUCH_MOUSE_DEVICE" + /** * \brief A variable controlling whether the Android / tvOS remotes * should be listed as joystick devices, instead of sending keyboard events. @@ -1393,6 +1494,28 @@ extern "C" { */ #define SDL_HINT_VIDEO_WINDOW_SHARE_PIXEL_FORMAT "SDL_VIDEO_WINDOW_SHARE_PIXEL_FORMAT" +/** + * \brief When calling SDL_CreateWindowFrom(), make the window compatible with OpenGL. + * + * This variable can be set to the following values: + * "0" - Don't add any graphics flags to the SDL_WindowFlags + * "1" - Add SDL_WINDOW_OPENGL to the SDL_WindowFlags + * + * By default SDL will not make the foreign window compatible with OpenGL. + */ +#define SDL_HINT_VIDEO_FOREIGN_WINDOW_OPENGL "SDL_VIDEO_FOREIGN_WINDOW_OPENGL" + +/** + * \brief When calling SDL_CreateWindowFrom(), make the window compatible with Vulkan. + * + * This variable can be set to the following values: + * "0" - Don't add any graphics flags to the SDL_WindowFlags + * "1" - Add SDL_WINDOW_VULKAN to the SDL_WindowFlags + * + * By default SDL will not make the foreign window compatible with Vulkan. + */ +#define SDL_HINT_VIDEO_FOREIGN_WINDOW_VULKAN "SDL_VIDEO_FOREIGN_WINDOW_VULKAN" + /** * \brief A variable specifying which shader compiler to preload when using the Chrome ANGLE binaries * @@ -1811,6 +1934,50 @@ extern "C" { */ #define SDL_HINT_AUDIO_INCLUDE_MONITORS "SDL_AUDIO_INCLUDE_MONITORS" +/** + * \brief A variable that forces X11 windows to create as a custom type. + * + * This is currently only used for X11 and ignored elsewhere. + * + * During SDL_CreateWindow, SDL uses the _NET_WM_WINDOW_TYPE X11 property + * to report to the window manager the type of window it wants to create. + * This might be set to various things if SDL_WINDOW_TOOLTIP or + * SDL_WINDOW_POPUP_MENU, etc, were specified. For "normal" windows that + * haven't set a specific type, this hint can be used to specify a custom + * type. For example, a dock window might set this to + * "_NET_WM_WINDOW_TYPE_DOCK". + * + * If not set or set to "", this hint is ignored. This hint must be set + * before the SDL_CreateWindow() call that it is intended to affect. + * + * This hint is available since SDL 2.0.22. + */ +#define SDL_HINT_X11_WINDOW_TYPE "SDL_X11_WINDOW_TYPE" + +/** + * \brief A variable that decides whether to send SDL_QUIT when closing the final window. + * + * By default, SDL sends an SDL_QUIT event when there is only one window + * and it receives an SDL_WINDOWEVENT_CLOSE event, under the assumption most + * apps would also take the loss of this window as a signal to terminate the + * program. + * + * However, it's not unreasonable in some cases to have the program continue + * to live on, perhaps to create new windows later. + * + * Changing this hint to "0" will cause SDL to not send an SDL_QUIT event + * when the final window is requesting to close. Note that in this case, + * there are still other legitimate reasons one might get an SDL_QUIT + * event: choosing "Quit" from the macOS menu bar, sending a SIGINT (ctrl-c) + * on Unix, etc. + * + * The default value is "1". This hint can be changed at any time. + * + * This hint is available since SDL 2.0.22. Before then, you always get + * an SDL_QUIT event when closing the final window. + */ +#define SDL_HINT_QUIT_ON_LAST_WINDOW_CLOSE "SDL_QUIT_ON_LAST_WINDOW_CLOSE" + /** * \brief An enumeration of hint priorities diff --git a/Windows/SDL2/include/SDL_joystick.h b/Windows/SDL2/include/SDL_joystick.h index ef99a656..07e2b156 100644 --- a/Windows/SDL2/include/SDL_joystick.h +++ b/Windows/SDL2/include/SDL_joystick.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2021 Sam Lantinga + Copyright (C) 1997-2022 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages @@ -829,9 +829,9 @@ extern DECLSPEC int SDLCALL SDL_JoystickRumble(SDL_Joystick *joystick, Uint16 lo * Each call to this function cancels any previous trigger rumble effect, and * calling it with 0 intensity stops any rumbling. * - * Note that this function is for _trigger_ rumble; the first joystick to - * support this was the PlayStation 5's DualShock 5 controller. If you want - * the (more common) whole-controller rumble, use SDL_JoystickRumble() + * Note that this is rumbling of the _triggers_ and not the game controller as + * a whole. This is currently only supported on Xbox One controllers. If you + * want the (more common) whole-controller rumble, use SDL_JoystickRumble() * instead. * * \param joystick The joystick to vibrate diff --git a/Windows/SDL2/include/SDL_keyboard.h b/Windows/SDL2/include/SDL_keyboard.h index 5b4fd91a..0aa59907 100644 --- a/Windows/SDL2/include/SDL_keyboard.h +++ b/Windows/SDL2/include/SDL_keyboard.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2021 Sam Lantinga + Copyright (C) 1997-2022 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages @@ -268,9 +268,30 @@ extern DECLSPEC SDL_bool SDLCALL SDL_IsTextInputActive(void); */ extern DECLSPEC void SDLCALL SDL_StopTextInput(void); +/** + * Dismiss the composition window/IME without disabling the subsystem. + * + * \since This function is available since SDL 2.0.22. + * + * \sa SDL_StartTextInput + * \sa SDL_StopTextInput + */ +extern DECLSPEC void SDLCALL SDL_ClearComposition(void); + +/** + * Returns if an IME Composite or Candidate window is currently shown. + * + * \since This function is available since SDL 2.0.22. + */ +extern DECLSPEC SDL_bool SDLCALL SDL_IsTextInputShown(void); + /** * Set the rectangle used to type Unicode text inputs. * + * Note: If you want use system native IME window, try to set hint + * **SDL_HINT_IME_SHOW_UI** to **1**, otherwise this function won't give you + * any feedback. + * * \param rect the SDL_Rect structure representing the rectangle to receive * text (ignored if NULL) * diff --git a/Windows/SDL2/include/SDL_keycode.h b/Windows/SDL2/include/SDL_keycode.h index 14a24e3d..35602541 100644 --- a/Windows/SDL2/include/SDL_keycode.h +++ b/Windows/SDL2/include/SDL_keycode.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2021 Sam Lantinga + Copyright (C) 1997-2022 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages diff --git a/Windows/SDL2/include/SDL_loadso.h b/Windows/SDL2/include/SDL_loadso.h index 837c53e5..61857c81 100644 --- a/Windows/SDL2/include/SDL_loadso.h +++ b/Windows/SDL2/include/SDL_loadso.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2021 Sam Lantinga + Copyright (C) 1997-2022 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages diff --git a/Windows/SDL2/include/SDL_locale.h b/Windows/SDL2/include/SDL_locale.h index 858c1c9a..75157799 100644 --- a/Windows/SDL2/include/SDL_locale.h +++ b/Windows/SDL2/include/SDL_locale.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2021 Sam Lantinga + Copyright (C) 1997-2022 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages diff --git a/Windows/SDL2/include/SDL_log.h b/Windows/SDL2/include/SDL_log.h index 14189129..dbbcb1e6 100644 --- a/Windows/SDL2/include/SDL_log.h +++ b/Windows/SDL2/include/SDL_log.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2021 Sam Lantinga + Copyright (C) 1997-2022 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages diff --git a/Windows/SDL2/include/SDL_main.h b/Windows/SDL2/include/SDL_main.h index ec78e414..b3fec15f 100644 --- a/Windows/SDL2/include/SDL_main.h +++ b/Windows/SDL2/include/SDL_main.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2021 Sam Lantinga + Copyright (C) 1997-2022 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages @@ -83,6 +83,15 @@ */ #define SDL_MAIN_NEEDED +#elif defined(__PSP__) +/* On PSP SDL provides a main function that sets the module info, + activates the GPU and starts the thread required to be able to exit + the software. + + If you provide this yourself, you may define SDL_MAIN_HANDLED + */ +#define SDL_MAIN_AVAILABLE + #endif #endif /* SDL_MAIN_HANDLED */ diff --git a/Windows/SDL2/include/SDL_messagebox.h b/Windows/SDL2/include/SDL_messagebox.h index 2731c925..d763534d 100644 --- a/Windows/SDL2/include/SDL_messagebox.h +++ b/Windows/SDL2/include/SDL_messagebox.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2021 Sam Lantinga + Copyright (C) 1997-2022 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages diff --git a/Windows/SDL2/include/SDL_metal.h b/Windows/SDL2/include/SDL_metal.h index bc72ca76..eb308287 100644 --- a/Windows/SDL2/include/SDL_metal.h +++ b/Windows/SDL2/include/SDL_metal.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2021 Sam Lantinga + Copyright (C) 1997-2022 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages @@ -92,6 +92,7 @@ extern DECLSPEC void *SDLCALL SDL_Metal_GetLayer(SDL_MetalView view); * * \param window SDL_Window from which the drawable size should be queried * \param w Pointer to variable for storing the width in pixels, may be NULL + * \param h Pointer to variable for storing the height in pixels, may be NULL * * \since This function is available since SDL 2.0.14. * diff --git a/Windows/SDL2/include/SDL_misc.h b/Windows/SDL2/include/SDL_misc.h index ff0fa952..261b6b87 100644 --- a/Windows/SDL2/include/SDL_misc.h +++ b/Windows/SDL2/include/SDL_misc.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2021 Sam Lantinga + Copyright (C) 1997-2022 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages diff --git a/Windows/SDL2/include/SDL_mouse.h b/Windows/SDL2/include/SDL_mouse.h index c41055f4..1d4a2db0 100644 --- a/Windows/SDL2/include/SDL_mouse.h +++ b/Windows/SDL2/include/SDL_mouse.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2021 Sam Lantinga + Copyright (C) 1997-2022 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages diff --git a/Windows/SDL2/include/SDL_mutex.h b/Windows/SDL2/include/SDL_mutex.h index 7b082089..173468f6 100644 --- a/Windows/SDL2/include/SDL_mutex.h +++ b/Windows/SDL2/include/SDL_mutex.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2021 Sam Lantinga + Copyright (C) 1997-2022 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages diff --git a/Windows/SDL2/include/SDL_name.h b/Windows/SDL2/include/SDL_name.h index 21e1b798..6ff35b46 100644 --- a/Windows/SDL2/include/SDL_name.h +++ b/Windows/SDL2/include/SDL_name.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2021 Sam Lantinga + Copyright (C) 1997-2022 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages diff --git a/Windows/SDL2/include/SDL_opengl.h b/Windows/SDL2/include/SDL_opengl.h index 95b51ae4..9aed5035 100644 --- a/Windows/SDL2/include/SDL_opengl.h +++ b/Windows/SDL2/include/SDL_opengl.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2021 Sam Lantinga + Copyright (C) 1997-2022 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages diff --git a/Windows/SDL2/include/SDL_opengles.h b/Windows/SDL2/include/SDL_opengles.h index 7ebf4cc6..8511b960 100644 --- a/Windows/SDL2/include/SDL_opengles.h +++ b/Windows/SDL2/include/SDL_opengles.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2021 Sam Lantinga + Copyright (C) 1997-2022 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages diff --git a/Windows/SDL2/include/SDL_opengles2.h b/Windows/SDL2/include/SDL_opengles2.h index 876e9651..172fcb3f 100644 --- a/Windows/SDL2/include/SDL_opengles2.h +++ b/Windows/SDL2/include/SDL_opengles2.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2021 Sam Lantinga + Copyright (C) 1997-2022 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages diff --git a/Windows/SDL2/include/SDL_pixels.h b/Windows/SDL2/include/SDL_pixels.h index fcfd649c..5d2c0c89 100644 --- a/Windows/SDL2/include/SDL_pixels.h +++ b/Windows/SDL2/include/SDL_pixels.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2021 Sam Lantinga + Copyright (C) 1997-2022 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages @@ -301,6 +301,11 @@ typedef enum SDL_DEFINE_PIXELFOURCC('O', 'E', 'S', ' ') } SDL_PixelFormatEnum; +/** + * The bits of this structure can be directly reinterpreted as an integer-packed + * color which uses the SDL_PIXELFORMAT_RGBA32 format (SDL_PIXELFORMAT_ABGR8888 + * on little-endian systems and SDL_PIXELFORMAT_RGBA8888 on big-endian systems). + */ typedef struct SDL_Color { Uint8 r; diff --git a/Windows/SDL2/include/SDL_platform.h b/Windows/SDL2/include/SDL_platform.h index 8dc0cbcb..79b8b6f4 100644 --- a/Windows/SDL2/include/SDL_platform.h +++ b/Windows/SDL2/include/SDL_platform.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2021 Sam Lantinga + Copyright (C) 1997-2022 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages diff --git a/Windows/SDL2/include/SDL_power.h b/Windows/SDL2/include/SDL_power.h index 1a484ee2..ecb3f4b0 100644 --- a/Windows/SDL2/include/SDL_power.h +++ b/Windows/SDL2/include/SDL_power.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2021 Sam Lantinga + Copyright (C) 1997-2022 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages diff --git a/Windows/SDL2/include/SDL_quit.h b/Windows/SDL2/include/SDL_quit.h index 28250500..4090f7f1 100644 --- a/Windows/SDL2/include/SDL_quit.h +++ b/Windows/SDL2/include/SDL_quit.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2021 Sam Lantinga + Copyright (C) 1997-2022 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages diff --git a/Windows/SDL2/include/SDL_rect.h b/Windows/SDL2/include/SDL_rect.h index cf639099..55a6473f 100644 --- a/Windows/SDL2/include/SDL_rect.h +++ b/Windows/SDL2/include/SDL_rect.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2021 Sam Lantinga + Copyright (C) 1997-2022 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages @@ -54,8 +54,13 @@ typedef struct SDL_Point /** * The structure that defines a point (floating point) * - * \sa SDL_EnclosePoints - * \sa SDL_PointInRect + * \sa SDL_FRectEmpty + * \sa SDL_FRectEquals + * \sa SDL_HasIntersectionF + * \sa SDL_IntersectFRect + * \sa SDL_UnionFRect + * \sa SDL_EncloseFPoints + * \sa SDL_PointInFRect */ typedef struct SDL_FPoint { @@ -213,6 +218,131 @@ extern DECLSPEC SDL_bool SDLCALL SDL_IntersectRectAndLine(const SDL_Rect * int *Y1, int *X2, int *Y2); + +/* SDL_FRect versions... */ + +/** + * Returns true if point resides inside a rectangle. + */ +SDL_FORCE_INLINE SDL_bool SDL_PointInFRect(const SDL_FPoint *p, const SDL_FRect *r) +{ + return ( (p->x >= r->x) && (p->x < (r->x + r->w)) && + (p->y >= r->y) && (p->y < (r->y + r->h)) ) ? SDL_TRUE : SDL_FALSE; +} + +/** + * Returns true if the rectangle has no area. + */ +SDL_FORCE_INLINE SDL_bool SDL_FRectEmpty(const SDL_FRect *r) +{ + return ((!r) || (r->w <= 0.0f) || (r->h <= 0.0f)) ? SDL_TRUE : SDL_FALSE; +} + +/** + * Returns true if the two rectangles are equal. + */ +SDL_FORCE_INLINE SDL_bool SDL_FRectEquals(const SDL_FRect *a, const SDL_FRect *b) +{ + return (a && b && (a->x == b->x) && (a->y == b->y) && + (a->w == b->w) && (a->h == b->h)) ? SDL_TRUE : SDL_FALSE; +} + +/** + * Determine whether two rectangles intersect with float precision. + * + * If either pointer is NULL the function will return SDL_FALSE. + * + * \param A an SDL_FRect structure representing the first rectangle + * \param B an SDL_FRect structure representing the second rectangle + * \returns SDL_TRUE if there is an intersection, SDL_FALSE otherwise. + * + * \since This function is available since SDL 2.0.22. + * + * \sa SDL_IntersectRect + */ +extern DECLSPEC SDL_bool SDLCALL SDL_HasIntersectionF(const SDL_FRect * A, + const SDL_FRect * B); + +/** + * Calculate the intersection of two rectangles with float precision. + * + * If `result` is NULL then this function will return SDL_FALSE. + * + * \param A an SDL_FRect structure representing the first rectangle + * \param B an SDL_FRect structure representing the second rectangle + * \param result an SDL_FRect structure filled in with the intersection of + * rectangles `A` and `B` + * \returns SDL_TRUE if there is an intersection, SDL_FALSE otherwise. + * + * \since This function is available since SDL 2.0.22. + * + * \sa SDL_HasIntersectionF + */ +extern DECLSPEC SDL_bool SDLCALL SDL_IntersectFRect(const SDL_FRect * A, + const SDL_FRect * B, + SDL_FRect * result); + +/** + * Calculate the union of two rectangles with float precision. + * + * \param A an SDL_FRect structure representing the first rectangle + * \param B an SDL_FRect structure representing the second rectangle + * \param result an SDL_FRect structure filled in with the union of rectangles + * `A` and `B` + * + * \since This function is available since SDL 2.0.22. + */ +extern DECLSPEC void SDLCALL SDL_UnionFRect(const SDL_FRect * A, + const SDL_FRect * B, + SDL_FRect * result); + +/** + * Calculate a minimal rectangle enclosing a set of points with float + * precision. + * + * If `clip` is not NULL then only points inside of the clipping rectangle are + * considered. + * + * \param points an array of SDL_FPoint structures representing points to be + * enclosed + * \param count the number of structures in the `points` array + * \param clip an SDL_FRect used for clipping or NULL to enclose all points + * \param result an SDL_FRect structure filled in with the minimal enclosing + * rectangle + * \returns SDL_TRUE if any points were enclosed or SDL_FALSE if all the + * points were outside of the clipping rectangle. + * + * \since This function is available since SDL 2.0.22. + */ +extern DECLSPEC SDL_bool SDLCALL SDL_EncloseFPoints(const SDL_FPoint * points, + int count, + const SDL_FRect * clip, + SDL_FRect * result); + +/** + * Calculate the intersection of a rectangle and line segment with float + * precision. + * + * This function is used to clip a line segment to a rectangle. A line segment + * contained entirely within the rectangle or that does not intersect will + * remain unchanged. A line segment that crosses the rectangle at either or + * both ends will be clipped to the boundary of the rectangle and the new + * coordinates saved in `X1`, `Y1`, `X2`, and/or `Y2` as necessary. + * + * \param rect an SDL_FRect structure representing the rectangle to intersect + * \param X1 a pointer to the starting X-coordinate of the line + * \param Y1 a pointer to the starting Y-coordinate of the line + * \param X2 a pointer to the ending X-coordinate of the line + * \param Y2 a pointer to the ending Y-coordinate of the line + * \returns SDL_TRUE if there is an intersection, SDL_FALSE otherwise. + * + * \since This function is available since SDL 2.0.22. + */ +extern DECLSPEC SDL_bool SDLCALL SDL_IntersectFRectAndLine(const SDL_FRect * + rect, float *X1, + float *Y1, float *X2, + float *Y2); + /* Ends C function definitions when using C++ */ #ifdef __cplusplus } diff --git a/Windows/SDL2/include/SDL_render.h b/Windows/SDL2/include/SDL_render.h index eed480b5..d859e3fd 100644 --- a/Windows/SDL2/include/SDL_render.h +++ b/Windows/SDL2/include/SDL_render.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2021 Sam Lantinga + Copyright (C) 1997-2022 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages @@ -261,6 +261,17 @@ extern DECLSPEC SDL_Renderer * SDLCALL SDL_CreateSoftwareRenderer(SDL_Surface * */ extern DECLSPEC SDL_Renderer * SDLCALL SDL_GetRenderer(SDL_Window * window); +/** + * Get the window associated with a renderer. + * + * \param renderer the renderer to query + * \returns the window on success or NULL on failure; call SDL_GetError() for + * more information. + * + * \since This function is available since SDL 2.0.22. + */ +extern DECLSPEC SDL_Window * SDLCALL SDL_RenderGetWindow(SDL_Renderer *renderer); + /** * Get information about a rendering context. * @@ -356,11 +367,15 @@ extern DECLSPEC SDL_Texture * SDLCALL SDL_CreateTextureFromSurface(SDL_Renderer * \param texture the texture to query * \param format a pointer filled in with the raw format of the texture; the * actual format may differ, but pixel transfers will use this - * format (one of the SDL_PixelFormatEnum values) + * format (one of the SDL_PixelFormatEnum values). This argument + * can be NULL if you don't need this information. * \param access a pointer filled in with the actual access to the texture - * (one of the SDL_TextureAccess values) - * \param w a pointer filled in with the width of the texture in pixels - * \param h a pointer filled in with the height of the texture in pixels + * (one of the SDL_TextureAccess values). This argument can be + * NULL if you don't need this information. + * \param w a pointer filled in with the width of the texture in pixels. This + * argument can be NULL if you don't need this information. + * \param h a pointer filled in with the height of the texture in pixels. This + * argument can be NULL if you don't need this information. * \returns 0 on success or a negative error code on failure; call * SDL_GetError() for more information. * @@ -1603,6 +1618,7 @@ extern DECLSPEC int SDLCALL SDL_RenderCopyExF(SDL_Renderer * renderer, * vertex array Color and alpha modulation is done per vertex * (SDL_SetTextureColorMod and SDL_SetTextureAlphaMod are ignored). * + * \param renderer The rendering context. * \param texture (optional) The SDL texture to use. * \param vertices Vertices. * \param num_vertices Number of vertices. @@ -1614,6 +1630,7 @@ extern DECLSPEC int SDLCALL SDL_RenderCopyExF(SDL_Renderer * renderer, * * \since This function is available since SDL 2.0.18. * + * \sa SDL_RenderGeometryRaw * \sa SDL_Vertex */ extern DECLSPEC int SDLCALL SDL_RenderGeometry(SDL_Renderer *renderer, @@ -1626,6 +1643,7 @@ extern DECLSPEC int SDLCALL SDL_RenderGeometry(SDL_Renderer *renderer, * vertex arrays Color and alpha modulation is done per vertex * (SDL_SetTextureColorMod and SDL_SetTextureAlphaMod are ignored). * + * \param renderer The rendering context. * \param texture (optional) The SDL texture to use. * \param xy Vertex positions * \param xy_stride Byte size to move from one element to the next element @@ -1641,11 +1659,14 @@ extern DECLSPEC int SDLCALL SDL_RenderGeometry(SDL_Renderer *renderer, * \return 0 on success, or -1 if the operation is not supported * * \since This function is available since SDL 2.0.18. + * + * \sa SDL_RenderGeometry + * \sa SDL_Vertex */ extern DECLSPEC int SDLCALL SDL_RenderGeometryRaw(SDL_Renderer *renderer, SDL_Texture *texture, const float *xy, int xy_stride, - const int *color, int color_stride, + const SDL_Color *color, int color_stride, const float *uv, int uv_stride, int num_vertices, const void *indices, int num_indices, int size_indices); @@ -1654,7 +1675,8 @@ extern DECLSPEC int SDLCALL SDL_RenderGeometryRaw(SDL_Renderer *renderer, * Read pixels from the current rendering target to an array of pixels. * * **WARNING**: This is a very slow operation, and should not be used - * frequently. + * frequently. If you're using this on the main rendering target, it should be + * called after rendering and before SDL_RenderPresent(). * * `pitch` specifies the number of bytes between rows in the destination * `pixels` data. This allows you to write to a subrectangle or have padded diff --git a/Windows/SDL2/include/SDL_revision.h b/Windows/SDL2/include/SDL_revision.h index b5c58b02..b7a8dbe6 100644 --- a/Windows/SDL2/include/SDL_revision.h +++ b/Windows/SDL2/include/SDL_revision.h @@ -1,2 +1,2 @@ -#define SDL_REVISION "https://github.com/libsdl-org/SDL.git@2e9821423a237a1206e3c09020778faacfe430be" +#define SDL_REVISION "https://github.com/libsdl-org/SDL.git@505d6a4a052592b2676f87456c1f564daa8d2c50" #define SDL_REVISION_NUMBER 0 diff --git a/Windows/SDL2/include/SDL_rwops.h b/Windows/SDL2/include/SDL_rwops.h index 90afebd6..71e5c8db 100644 --- a/Windows/SDL2/include/SDL_rwops.h +++ b/Windows/SDL2/include/SDL_rwops.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2021 Sam Lantinga + Copyright (C) 1997-2022 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages diff --git a/Windows/SDL2/include/SDL_scancode.h b/Windows/SDL2/include/SDL_scancode.h index e54c1e00..5b2c67c8 100644 --- a/Windows/SDL2/include/SDL_scancode.h +++ b/Windows/SDL2/include/SDL_scancode.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2021 Sam Lantinga + Copyright (C) 1997-2022 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages diff --git a/Windows/SDL2/include/SDL_sensor.h b/Windows/SDL2/include/SDL_sensor.h index 243ca6d9..a2f30e0f 100644 --- a/Windows/SDL2/include/SDL_sensor.h +++ b/Windows/SDL2/include/SDL_sensor.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2021 Sam Lantinga + Copyright (C) 1997-2022 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages diff --git a/Windows/SDL2/include/SDL_shape.h b/Windows/SDL2/include/SDL_shape.h index 4b27204b..1bca9270 100644 --- a/Windows/SDL2/include/SDL_shape.h +++ b/Windows/SDL2/include/SDL_shape.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2021 Sam Lantinga + Copyright (C) 1997-2022 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages diff --git a/Windows/SDL2/include/SDL_stdinc.h b/Windows/SDL2/include/SDL_stdinc.h index 15a63544..6ddb9775 100644 --- a/Windows/SDL2/include/SDL_stdinc.h +++ b/Windows/SDL2/include/SDL_stdinc.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2021 Sam Lantinga + Copyright (C) 1997-2022 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages @@ -354,8 +354,14 @@ typedef uint64_t Uint64; #endif #endif /* SDL_DISABLE_ANALYZE_MACROS */ +#if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 201112L) +#define SDL_COMPILE_TIME_ASSERT(name, x) _Static_assert(x, #x) +#elif defined(__cplusplus) && (__cplusplus >= 201103L) +#define SDL_COMPILE_TIME_ASSERT(name, x) static_assert(x, #x) +#else /* universal, but may trigger -Wunused-local-typedefs */ #define SDL_COMPILE_TIME_ASSERT(name, x) \ typedef int SDL_compile_time_assert_ ## name[(x) * 2 - 1] +#endif /** \cond */ #ifndef DOXYGEN_SHOULD_IGNORE_THIS SDL_COMPILE_TIME_ASSERT(uint8, sizeof(Uint8) == 1); diff --git a/Windows/SDL2/include/SDL_surface.h b/Windows/SDL2/include/SDL_surface.h index 0b18fa00..44123761 100644 --- a/Windows/SDL2/include/SDL_surface.h +++ b/Windows/SDL2/include/SDL_surface.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2021 Sam Lantinga + Copyright (C) 1997-2022 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages diff --git a/Windows/SDL2/include/SDL_system.h b/Windows/SDL2/include/SDL_system.h index 937e622f..41563add 100644 --- a/Windows/SDL2/include/SDL_system.h +++ b/Windows/SDL2/include/SDL_system.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2021 Sam Lantinga + Copyright (C) 1997-2022 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages @@ -425,6 +425,18 @@ extern DECLSPEC SDL_bool SDLCALL SDL_AndroidRequestPermission(const char *permis */ extern DECLSPEC int SDLCALL SDL_AndroidShowToast(const char* message, int duration, int gravity, int xoffset, int yoffset); +/** + * Send a user command to SDLActivity. + * + * Override "boolean onUnhandledMessage(Message msg)" to handle the message. + * + * \param command user command that must be greater or equal to 0x8000 + * \param param user parameter + * + * \since This function is available since SDL 2.0.22. + */ +extern DECLSPEC int SDLCALL SDL_AndroidSendMessage(Uint32 command, int param); + #endif /* __ANDROID__ */ /* Platform specific functions for WinRT */ diff --git a/Windows/SDL2/include/SDL_syswm.h b/Windows/SDL2/include/SDL_syswm.h index d25efc14..f7cd670c 100644 --- a/Windows/SDL2/include/SDL_syswm.h +++ b/Windows/SDL2/include/SDL_syswm.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2021 Sam Lantinga + Copyright (C) 1997-2022 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages @@ -98,6 +98,10 @@ typedef struct _UIViewController UIViewController; typedef Uint32 GLuint; #endif +#if defined(SDL_VIDEO_VULKAN) || defined(SDL_VIDEO_METAL) +#define SDL_METALVIEW_TAG 255 +#endif + #if defined(SDL_VIDEO_DRIVER_ANDROID) typedef struct ANativeWindow ANativeWindow; typedef void *EGLSurface; diff --git a/Windows/SDL2/include/SDL_thread.h b/Windows/SDL2/include/SDL_thread.h index 10ec43b9..35e680dd 100644 --- a/Windows/SDL2/include/SDL_thread.h +++ b/Windows/SDL2/include/SDL_thread.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2021 Sam Lantinga + Copyright (C) 1997-2022 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages diff --git a/Windows/SDL2/include/SDL_timer.h b/Windows/SDL2/include/SDL_timer.h index 1315b5f9..62f81d42 100644 --- a/Windows/SDL2/include/SDL_timer.h +++ b/Windows/SDL2/include/SDL_timer.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2021 Sam Lantinga + Copyright (C) 1997-2022 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages diff --git a/Windows/SDL2/include/SDL_touch.h b/Windows/SDL2/include/SDL_touch.h index f9a8545b..95924135 100644 --- a/Windows/SDL2/include/SDL_touch.h +++ b/Windows/SDL2/include/SDL_touch.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2021 Sam Lantinga + Copyright (C) 1997-2022 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages @@ -95,6 +95,14 @@ extern DECLSPEC int SDLCALL SDL_GetNumTouchDevices(void); */ extern DECLSPEC SDL_TouchID SDLCALL SDL_GetTouchDevice(int index); +/** + * Get the touch device name as reported from the driver or NULL if the index + * is invalid. + * + * \since This function is available since SDL 2.0.22. + */ +extern DECLSPEC const char* SDLCALL SDL_GetTouchName(int index); + /** * Get the type of the given touch device. * diff --git a/Windows/SDL2/include/SDL_types.h b/Windows/SDL2/include/SDL_types.h index 4267f366..355fb501 100644 --- a/Windows/SDL2/include/SDL_types.h +++ b/Windows/SDL2/include/SDL_types.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2021 Sam Lantinga + Copyright (C) 1997-2022 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages diff --git a/Windows/SDL2/include/SDL_version.h b/Windows/SDL2/include/SDL_version.h index 949c6594..3df4e041 100644 --- a/Windows/SDL2/include/SDL_version.h +++ b/Windows/SDL2/include/SDL_version.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2021 Sam Lantinga + Copyright (C) 1997-2022 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages @@ -59,7 +59,7 @@ typedef struct SDL_version */ #define SDL_MAJOR_VERSION 2 #define SDL_MINOR_VERSION 0 -#define SDL_PATCHLEVEL 18 +#define SDL_PATCHLEVEL 22 /** * Macro to determine SDL version program was compiled against. diff --git a/Windows/SDL2/include/SDL_video.h b/Windows/SDL2/include/SDL_video.h index c1a9e1e7..c62e0891 100644 --- a/Windows/SDL2/include/SDL_video.h +++ b/Windows/SDL2/include/SDL_video.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2021 Sam Lantinga + Copyright (C) 1997-2022 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages @@ -1337,6 +1337,7 @@ extern DECLSPEC void SDLCALL SDL_SetWindowKeyboardGrab(SDL_Window * window, * Mouse grab confines the mouse cursor to the window. * * \param window The window for which the mouse grab mode should be set. + * \param grabbed This is SDL_TRUE to grab mouse, and SDL_FALSE to release. * * \since This function is available since SDL 2.0.16. * diff --git a/Windows/SDL2/include/begin_code.h b/Windows/SDL2/include/begin_code.h index 66010b66..b1b1a3a9 100644 --- a/Windows/SDL2/include/begin_code.h +++ b/Windows/SDL2/include/begin_code.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2021 Sam Lantinga + Copyright (C) 1997-2022 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages @@ -107,7 +107,7 @@ #ifdef __BORLANDC__ #pragma nopackwarning #endif -#ifdef _M_X64 +#ifdef _WIN64 /* Use 8-byte alignment on 64-bit architectures, so pointers are aligned */ #pragma pack(push,8) #else diff --git a/Windows/SDL2/include/close_code.h b/Windows/SDL2/include/close_code.h index c65a2162..dc73432f 100644 --- a/Windows/SDL2/include/close_code.h +++ b/Windows/SDL2/include/close_code.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2021 Sam Lantinga + Copyright (C) 1997-2022 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages diff --git a/Windows/SDL2/lib/SDL2.dll b/Windows/SDL2/lib/SDL2.dll index c8879bfd..ce3a3822 100644 Binary files a/Windows/SDL2/lib/SDL2.dll and b/Windows/SDL2/lib/SDL2.dll differ diff --git a/Windows/SDL2/lib/SDL2.lib b/Windows/SDL2/lib/SDL2.lib index b5f470f5..a5968954 100644 Binary files a/Windows/SDL2/lib/SDL2.lib and b/Windows/SDL2/lib/SDL2.lib differ diff --git a/Windows/SDL2/lib/SDL2main.lib b/Windows/SDL2/lib/SDL2main.lib index 08d617f9..ec61b596 100644 Binary files a/Windows/SDL2/lib/SDL2main.lib and b/Windows/SDL2/lib/SDL2main.lib differ diff --git a/Windows/SDL2/lib/libSDL2.dll.a b/Windows/SDL2/lib/libSDL2.dll.a index 0658ae9c..5abd5ad1 100644 Binary files a/Windows/SDL2/lib/libSDL2.dll.a and b/Windows/SDL2/lib/libSDL2.dll.a differ diff --git a/Windows/SDL2/lib/libSDL2main.a b/Windows/SDL2/lib/libSDL2main.a index 49678ea5..a3e07249 100644 Binary files a/Windows/SDL2/lib/libSDL2main.a and b/Windows/SDL2/lib/libSDL2main.a differ diff --git a/Windows/SDL2/lib64/SDL2.dll b/Windows/SDL2/lib64/SDL2.dll index 7f2b9fd7..c0682f72 100644 Binary files a/Windows/SDL2/lib64/SDL2.dll and b/Windows/SDL2/lib64/SDL2.dll differ diff --git a/Windows/SDL2/lib64/SDL2.lib b/Windows/SDL2/lib64/SDL2.lib index 3dec9256..2254692c 100644 Binary files a/Windows/SDL2/lib64/SDL2.lib and b/Windows/SDL2/lib64/SDL2.lib differ diff --git a/Windows/SDL2/lib64/SDL2main.lib b/Windows/SDL2/lib64/SDL2main.lib index 915c7b11..b286cba9 100644 Binary files a/Windows/SDL2/lib64/SDL2main.lib and b/Windows/SDL2/lib64/SDL2main.lib differ diff --git a/Windows/SDL2/lib64/libSDL2.dll.a b/Windows/SDL2/lib64/libSDL2.dll.a index daeb78e3..ecc16632 100644 Binary files a/Windows/SDL2/lib64/libSDL2.dll.a and b/Windows/SDL2/lib64/libSDL2.dll.a differ diff --git a/Windows/SDL2/lib64/libSDL2main.a b/Windows/SDL2/lib64/libSDL2main.a index 055352b8..ba70ada9 100644 Binary files a/Windows/SDL2/lib64/libSDL2main.a and b/Windows/SDL2/lib64/libSDL2main.a differ diff --git a/Windows/SDL2/main/SDL_windows.h b/Windows/SDL2/main/SDL_windows.h index f555e495..917a8256 100644 --- a/Windows/SDL2/main/SDL_windows.h +++ b/Windows/SDL2/main/SDL_windows.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2021 Sam Lantinga + Copyright (C) 1997-2022 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages @@ -63,10 +63,19 @@ extern int WIN_SetErrorFromHRESULT(const char *prefix, HRESULT hr); /* Sets an error message based on GetLastError(). Always return -1. */ extern int WIN_SetError(const char *prefix); +#if !defined(__WINRT__) +/* Load a function from combase.dll */ +void *WIN_LoadComBaseFunction(const char *name); +#endif + /* Wrap up the oddities of CoInitialize() into a common function. */ extern HRESULT WIN_CoInitialize(void); extern void WIN_CoUninitialize(void); +/* Wrap up the oddities of RoInitialize() into a common function. */ +extern HRESULT WIN_RoInitialize(void); +extern void WIN_RoUninitialize(void); + /* Returns SDL_TRUE if we're running on Windows Vista and newer */ extern BOOL WIN_IsWindowsVistaOrGreater(void); diff --git a/Windows/SDL2/watcom/SDL2.def b/Windows/SDL2/watcom/SDL2.def index e4e32270..3abfc11a 100644 --- a/Windows/SDL2/watcom/SDL2.def +++ b/Windows/SDL2/watcom/SDL2.def @@ -27,6 +27,7 @@ SDL_AudioStreamPut SDL_BuildAudioCVT SDL_CalculateGammaRamp SDL_CaptureMouse +SDL_ClearComposition SDL_ClearError SDL_ClearHints SDL_ClearQueuedAudio @@ -78,6 +79,7 @@ SDL_Direct3D9GetAdapterIndex SDL_DisableScreenSaver SDL_DuplicateSurface SDL_EnableScreenSaver +SDL_EncloseFPoints SDL_EnclosePoints SDL_Error SDL_EventState @@ -257,6 +259,7 @@ SDL_GetTicks64 SDL_GetTouchDevice SDL_GetTouchDeviceType SDL_GetTouchFinger +SDL_GetTouchName SDL_GetVersion SDL_GetVideoDriver SDL_GetWindowBordersSize @@ -322,6 +325,7 @@ SDL_HasColorKey SDL_HasEvent SDL_HasEvents SDL_HasIntersection +SDL_HasIntersectionF SDL_HasMMX SDL_HasNEON SDL_HasRDTSC @@ -335,6 +339,8 @@ SDL_HasSurfaceRLE SDL_HideWindow SDL_Init SDL_InitSubSystem +SDL_IntersectFRect +SDL_IntersectFRectAndLine SDL_IntersectRect SDL_IntersectRectAndLine SDL_IsGameController @@ -343,6 +349,7 @@ SDL_IsScreenSaverEnabled SDL_IsShapedWindow SDL_IsTablet SDL_IsTextInputActive +SDL_IsTextInputShown SDL_JoystickAttachVirtual SDL_JoystickClose SDL_JoystickCurrentPowerLevel @@ -520,6 +527,7 @@ SDL_RenderGetMetalCommandEncoder SDL_RenderGetMetalLayer SDL_RenderGetScale SDL_RenderGetViewport +SDL_RenderGetWindow SDL_RenderIsClipEnabled SDL_RenderLogicalToWindow SDL_RenderPresent @@ -629,6 +637,7 @@ SDL_TLSGet SDL_TLSSet SDL_ThreadID SDL_TryLockMutex +SDL_UnionFRect SDL_UnionRect SDL_UnloadObject SDL_UnlockAudio diff --git a/Windows/SDL2/watcom/SDL2.exp b/Windows/SDL2/watcom/SDL2.exp index b03c0a71..e65f8e66 100644 --- a/Windows/SDL2/watcom/SDL2.exp +++ b/Windows/SDL2/watcom/SDL2.exp @@ -24,6 +24,7 @@ ++'_SDL_BuildAudioCVT'.'SDL2.DLL'..'SDL_BuildAudioCVT' ++'_SDL_CalculateGammaRamp'.'SDL2.DLL'..'SDL_CalculateGammaRamp' ++'_SDL_CaptureMouse'.'SDL2.DLL'..'SDL_CaptureMouse' +++'_SDL_ClearComposition'.'SDL2.DLL'..'SDL_ClearComposition' ++'_SDL_ClearError'.'SDL2.DLL'..'SDL_ClearError' ++'_SDL_ClearHints'.'SDL2.DLL'..'SDL_ClearHints' ++'_SDL_ClearQueuedAudio'.'SDL2.DLL'..'SDL_ClearQueuedAudio' @@ -75,6 +76,7 @@ ++'_SDL_DisableScreenSaver'.'SDL2.DLL'..'SDL_DisableScreenSaver' ++'_SDL_DuplicateSurface'.'SDL2.DLL'..'SDL_DuplicateSurface' ++'_SDL_EnableScreenSaver'.'SDL2.DLL'..'SDL_EnableScreenSaver' +++'_SDL_EncloseFPoints'.'SDL2.DLL'..'SDL_EncloseFPoints' ++'_SDL_EnclosePoints'.'SDL2.DLL'..'SDL_EnclosePoints' ++'_SDL_Error'.'SDL2.DLL'..'SDL_Error' ++'_SDL_EventState'.'SDL2.DLL'..'SDL_EventState' @@ -254,6 +256,7 @@ ++'_SDL_GetTouchDevice'.'SDL2.DLL'..'SDL_GetTouchDevice' ++'_SDL_GetTouchDeviceType'.'SDL2.DLL'..'SDL_GetTouchDeviceType' ++'_SDL_GetTouchFinger'.'SDL2.DLL'..'SDL_GetTouchFinger' +++'_SDL_GetTouchName'.'SDL2.DLL'..'SDL_GetTouchName' ++'_SDL_GetVersion'.'SDL2.DLL'..'SDL_GetVersion' ++'_SDL_GetVideoDriver'.'SDL2.DLL'..'SDL_GetVideoDriver' ++'_SDL_GetWindowBordersSize'.'SDL2.DLL'..'SDL_GetWindowBordersSize' @@ -319,6 +322,7 @@ ++'_SDL_HasEvent'.'SDL2.DLL'..'SDL_HasEvent' ++'_SDL_HasEvents'.'SDL2.DLL'..'SDL_HasEvents' ++'_SDL_HasIntersection'.'SDL2.DLL'..'SDL_HasIntersection' +++'_SDL_HasIntersectionF'.'SDL2.DLL'..'SDL_HasIntersectionF' ++'_SDL_HasMMX'.'SDL2.DLL'..'SDL_HasMMX' ++'_SDL_HasNEON'.'SDL2.DLL'..'SDL_HasNEON' ++'_SDL_HasRDTSC'.'SDL2.DLL'..'SDL_HasRDTSC' @@ -332,6 +336,8 @@ ++'_SDL_HideWindow'.'SDL2.DLL'..'SDL_HideWindow' ++'_SDL_Init'.'SDL2.DLL'..'SDL_Init' ++'_SDL_InitSubSystem'.'SDL2.DLL'..'SDL_InitSubSystem' +++'_SDL_IntersectFRect'.'SDL2.DLL'..'SDL_IntersectFRect' +++'_SDL_IntersectFRectAndLine'.'SDL2.DLL'..'SDL_IntersectFRectAndLine' ++'_SDL_IntersectRect'.'SDL2.DLL'..'SDL_IntersectRect' ++'_SDL_IntersectRectAndLine'.'SDL2.DLL'..'SDL_IntersectRectAndLine' ++'_SDL_IsGameController'.'SDL2.DLL'..'SDL_IsGameController' @@ -340,6 +346,7 @@ ++'_SDL_IsShapedWindow'.'SDL2.DLL'..'SDL_IsShapedWindow' ++'_SDL_IsTablet'.'SDL2.DLL'..'SDL_IsTablet' ++'_SDL_IsTextInputActive'.'SDL2.DLL'..'SDL_IsTextInputActive' +++'_SDL_IsTextInputShown'.'SDL2.DLL'..'SDL_IsTextInputShown' ++'_SDL_JoystickAttachVirtual'.'SDL2.DLL'..'SDL_JoystickAttachVirtual' ++'_SDL_JoystickClose'.'SDL2.DLL'..'SDL_JoystickClose' ++'_SDL_JoystickCurrentPowerLevel'.'SDL2.DLL'..'SDL_JoystickCurrentPowerLevel' @@ -517,6 +524,7 @@ ++'_SDL_RenderGetMetalLayer'.'SDL2.DLL'..'SDL_RenderGetMetalLayer' ++'_SDL_RenderGetScale'.'SDL2.DLL'..'SDL_RenderGetScale' ++'_SDL_RenderGetViewport'.'SDL2.DLL'..'SDL_RenderGetViewport' +++'_SDL_RenderGetWindow'.'SDL2.DLL'..'SDL_RenderGetWindow' ++'_SDL_RenderIsClipEnabled'.'SDL2.DLL'..'SDL_RenderIsClipEnabled' ++'_SDL_RenderLogicalToWindow'.'SDL2.DLL'..'SDL_RenderLogicalToWindow' ++'_SDL_RenderPresent'.'SDL2.DLL'..'SDL_RenderPresent' @@ -626,6 +634,7 @@ ++'_SDL_TLSSet'.'SDL2.DLL'..'SDL_TLSSet' ++'_SDL_ThreadID'.'SDL2.DLL'..'SDL_ThreadID' ++'_SDL_TryLockMutex'.'SDL2.DLL'..'SDL_TryLockMutex' +++'_SDL_UnionFRect'.'SDL2.DLL'..'SDL_UnionFRect' ++'_SDL_UnionRect'.'SDL2.DLL'..'SDL_UnionRect' ++'_SDL_UnloadObject'.'SDL2.DLL'..'SDL_UnloadObject' ++'_SDL_UnlockAudio'.'SDL2.DLL'..'SDL_UnlockAudio' diff --git a/Windows/SDL2/watcom/SDL2.lib b/Windows/SDL2/watcom/SDL2.lib index 8401a93c..9ecd2f09 100644 Binary files a/Windows/SDL2/watcom/SDL2.lib and b/Windows/SDL2/watcom/SDL2.lib differ