ft2-clone

Fasttracker 2 clone
Log | Files | Refs | README | LICENSE

commit 8ecd5f0c674f67792272e101473989535c490cf7
parent a1ea12cbc8760c0421f4f7b3ed66c1996bbd6269
Author: Olav Sørensen <olav.sorensen@live.no>
Date:   Mon, 11 Jul 2022 20:40:52 +0200

Update SDL2

Diffstat:
Mrelease/macos/ft2-clone-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_audio.h | 4+---
Mrelease/macos/ft2-clone-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_blendmode.h | 10++++------
Mrelease/macos/ft2-clone-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_config.h | 2--
Mrelease/macos/ft2-clone-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_endian.h | 9+++++++++
Mrelease/macos/ft2-clone-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_events.h | 15+++++++++++++++
Mrelease/macos/ft2-clone-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_gamecontroller.h | 5+++--
Mrelease/macos/ft2-clone-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_hints.h | 217++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-
Mrelease/macos/ft2-clone-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_joystick.h | 6+++---
Mrelease/macos/ft2-clone-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_keyboard.h | 21+++++++++++++++++++++
Mrelease/macos/ft2-clone-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_metal.h | 1+
Mrelease/macos/ft2-clone-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_rect.h | 156++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++--
Mrelease/macos/ft2-clone-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_render.h | 28+++++++++++++++++++++++-----
Mrelease/macos/ft2-clone-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_revision.h | 2+-
Mrelease/macos/ft2-clone-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_stdinc.h | 19+++++++++++++++++++
Mrelease/macos/ft2-clone-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_system.h | 12++++++++++++
Mrelease/macos/ft2-clone-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_syswm.h | 2++
Mrelease/macos/ft2-clone-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_touch.h | 8++++++++
Mrelease/macos/ft2-clone-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_version.h | 2+-
Mrelease/macos/ft2-clone-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_video.h | 1+
Mrelease/macos/ft2-clone-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/begin_code.h | 2+-
Mrelease/macos/ft2-clone-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Resources/Info.plist | 18+++++++++---------
Mrelease/macos/ft2-clone-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Resources/default.metallib | 0
Mrelease/macos/ft2-clone-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/SDL2 | 0
Mrelease/macos/ft2-clone-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/_CodeSignature/CodeResources | 92++++++++++++++++++++++++++++++++++++++++----------------------------------------
Mrelease/win32/SDL2.dll | 0
Mrelease/win64/SDL2.dll | 0
Mvs2019_project/ft2-clone/SDL2.dll | 0
Mvs2019_project/ft2-clone/sdl/include/SDL2/SDL_audio.h | 4+---
Mvs2019_project/ft2-clone/sdl/include/SDL2/SDL_blendmode.h | 10++++------
Mvs2019_project/ft2-clone/sdl/include/SDL2/SDL_config.h | 5+++++
Mvs2019_project/ft2-clone/sdl/include/SDL2/SDL_endian.h | 9+++++++++
Mvs2019_project/ft2-clone/sdl/include/SDL2/SDL_events.h | 15+++++++++++++++
Mvs2019_project/ft2-clone/sdl/include/SDL2/SDL_gamecontroller.h | 5+++--
Mvs2019_project/ft2-clone/sdl/include/SDL2/SDL_hints.h | 217++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-
Mvs2019_project/ft2-clone/sdl/include/SDL2/SDL_joystick.h | 6+++---
Mvs2019_project/ft2-clone/sdl/include/SDL2/SDL_keyboard.h | 21+++++++++++++++++++++
Mvs2019_project/ft2-clone/sdl/include/SDL2/SDL_metal.h | 1+
Mvs2019_project/ft2-clone/sdl/include/SDL2/SDL_rect.h | 156++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++--
Mvs2019_project/ft2-clone/sdl/include/SDL2/SDL_render.h | 28+++++++++++++++++++++++-----
Mvs2019_project/ft2-clone/sdl/include/SDL2/SDL_revision.h | 2+-
Mvs2019_project/ft2-clone/sdl/include/SDL2/SDL_stdinc.h | 19+++++++++++++++++++
Mvs2019_project/ft2-clone/sdl/include/SDL2/SDL_system.h | 12++++++++++++
Mvs2019_project/ft2-clone/sdl/include/SDL2/SDL_syswm.h | 2++
Mvs2019_project/ft2-clone/sdl/include/SDL2/SDL_touch.h | 8++++++++
Mvs2019_project/ft2-clone/sdl/include/SDL2/SDL_version.h | 2+-
Mvs2019_project/ft2-clone/sdl/include/SDL2/SDL_video.h | 1+
Mvs2019_project/ft2-clone/sdl/include/SDL2/begin_code.h | 2+-
Mvs2019_project/ft2-clone/sdl/lib/SDL2.lib | 0
Mvs2019_project/ft2-clone/sdl/lib/SDL2main.lib | 0
Mvs2019_project/ft2-clone/sdl/lib64/SDL2.lib | 0
Mvs2019_project/ft2-clone/sdl/lib64/SDL2main.lib | 0
Mvs2019_project/x64/Debug/SDL2.dll | 0
52 files changed, 1050 insertions(+), 107 deletions(-)

diff --git a/release/macos/ft2-clone-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_audio.h b/release/macos/ft2-clone-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_audio.h @@ -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/release/macos/ft2-clone-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_blendmode.h b/release/macos/ft2-clone-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_blendmode.h @@ -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/release/macos/ft2-clone-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_config.h b/release/macos/ft2-clone-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_config.h @@ -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/release/macos/ft2-clone-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_endian.h b/release/macos/ft2-clone-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_endian.h @@ -65,6 +65,15 @@ _m_prefetch(void *__P) #elif defined(__FreeBSD__) || defined(__NetBSD__) #include <sys/endian.h> #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/release/macos/ft2-clone-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_events.h b/release/macos/ft2-clone-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_events.h @@ -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/release/macos/ft2-clone-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_gamecontroller.h b/release/macos/ft2-clone-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_gamecontroller.h @@ -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/release/macos/ft2-clone-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_hints.h b/release/macos/ft2-clone-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_hints.h @@ -413,6 +413,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. * * SDL can try to accelerate the SDL screen surface by using streaming @@ -567,6 +580,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" @@ -784,6 +822,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 * @@ -887,6 +934,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 * * This variable can be set to the following values: @@ -923,6 +986,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. * * This hint only applies to Unix-like platforms, and should set before @@ -1279,6 +1355,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. * @@ -1388,6 +1476,20 @@ extern "C" { #define SDL_HINT_VIDEO_WAYLAND_ALLOW_LIBDECOR "SDL_VIDEO_WAYLAND_ALLOW_LIBDECOR" /** + * \brief A variable controlling whether the libdecor Wayland backend is preferred over native decrations. + * + * When this hint is set, libdecor will be used to provide window decorations, even if xdg-decoration is + * available. (Note that, by default, libdecor will use xdg-decoration itself if available). + * + * This variable can be set to the following values: + * "0" - libdecor is enabled only if server-side decorations are unavailable. + * "1" - libdecor is always enabled if available. + * + * libdecor is used over xdg-shell when xdg-decoration protocol is unavailable. + */ +#define SDL_HINT_VIDEO_WAYLAND_PREFER_LIBDECOR "SDL_VIDEO_WAYLAND_PREFER_LIBDECOR" + +/** * \brief A variable that is the address of another SDL_Window* (as a hex string formatted with "%p"). * * If this hint is set before SDL_CreateWindowFrom() and the SDL_Window* it is set to has @@ -1407,6 +1509,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 * * SDL has EGL and OpenGL ES2 support on Windows via the ANGLE project. It @@ -1824,6 +1948,97 @@ 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 A variable that decides what video backend to use. + * + * By default, SDL will try all available video backends in a reasonable + * order until it finds one that can work, but this hint allows the app + * or user to force a specific target, such as "x11" if, say, you are + * on Wayland but want to try talking to the X server instead. + * + * This functionality has existed since SDL 2.0.0 (indeed, before that) + * but before 2.0.22 this was an environment variable only. In 2.0.22, + * it was upgraded to a full SDL hint, so you can set the environment + * variable as usual or programatically set the hint with SDL_SetHint, + * which won't propagate to child processes. + * + * The default value is unset, in which case SDL will try to figure out + * the best video backend on your behalf. This hint needs to be set + * before SDL_Init() is called to be useful. + * + * This hint is available since SDL 2.0.22. Before then, you could set + * the environment variable to get the same effect. + */ +#define SDL_HINT_VIDEODRIVER "SDL_VIDEODRIVER" + +/** + * \brief A variable that decides what audio backend to use. + * + * By default, SDL will try all available audio backends in a reasonable + * order until it finds one that can work, but this hint allows the app + * or user to force a specific target, such as "alsa" if, say, you are + * on PulseAudio but want to try talking to the lower level instead. + * + * This functionality has existed since SDL 2.0.0 (indeed, before that) + * but before 2.0.22 this was an environment variable only. In 2.0.22, + * it was upgraded to a full SDL hint, so you can set the environment + * variable as usual or programatically set the hint with SDL_SetHint, + * which won't propagate to child processes. + * + * The default value is unset, in which case SDL will try to figure out + * the best audio backend on your behalf. This hint needs to be set + * before SDL_Init() is called to be useful. + * + * This hint is available since SDL 2.0.22. Before then, you could set + * the environment variable to get the same effect. + */ +#define SDL_HINT_AUDIODRIVER "SDL_AUDIODRIVER" + /** * \brief An enumeration of hint priorities diff --git a/release/macos/ft2-clone-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_joystick.h b/release/macos/ft2-clone-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_joystick.h @@ -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/release/macos/ft2-clone-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_keyboard.h b/release/macos/ft2-clone-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_keyboard.h @@ -269,8 +269,29 @@ 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/release/macos/ft2-clone-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_metal.h b/release/macos/ft2-clone-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_metal.h @@ -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/release/macos/ft2-clone-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_rect.h b/release/macos/ft2-clone-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_rect.h @@ -54,8 +54,8 @@ typedef struct SDL_Point /** * The structure that defines a point (floating point) * - * \sa SDL_EnclosePoints - * \sa SDL_PointInRect + * \sa SDL_EncloseFPoints + * \sa SDL_PointInFRect */ typedef struct SDL_FPoint { @@ -71,6 +71,7 @@ typedef struct SDL_FPoint * \sa SDL_RectEquals * \sa SDL_HasIntersection * \sa SDL_IntersectRect + * \sa SDL_IntersectRectAndLine * \sa SDL_UnionRect * \sa SDL_EnclosePoints */ @@ -83,6 +84,16 @@ typedef struct SDL_Rect /** * A rectangle, with the origin at the upper left (floating point). + * + * \sa SDL_FRectEmpty + * \sa SDL_FRectEquals + * \sa SDL_FRectEqualsEpsilon + * \sa SDL_HasIntersectionF + * \sa SDL_IntersectFRect + * \sa SDL_IntersectFRectAndLine + * \sa SDL_UnionFRect + * \sa SDL_EncloseFPoints + * \sa SDL_PointInFRect */ typedef struct SDL_FRect { @@ -213,6 +224,147 @@ 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, within some given epsilon. + * + * \since This function is available since SDL 2.0.22. + */ +SDL_FORCE_INLINE SDL_bool SDL_FRectEqualsEpsilon(const SDL_FRect *a, const SDL_FRect *b, const float epsilon) +{ + return (a && b && ((a == b) || + ((SDL_fabs(a->x - b->x) <= epsilon) && + (SDL_fabs(a->y - b->y) <= epsilon) && + (SDL_fabs(a->w - b->w) <= epsilon) && + (SDL_fabs(a->h - b->h) <= epsilon)))) + ? SDL_TRUE : SDL_FALSE; +} + +/** + * Returns true if the two rectangles are equal, using a default epsilon. + * + * \since This function is available since SDL 2.0.22. + */ +SDL_FORCE_INLINE SDL_bool SDL_FRectEquals(const SDL_FRect *a, const SDL_FRect *b) +{ + return SDL_FRectEqualsEpsilon(a, b, SDL_FLT_EPSILON); +} + +/** + * 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/release/macos/ft2-clone-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_render.h b/release/macos/ft2-clone-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_render.h @@ -262,6 +262,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. * * \param renderer the 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. @@ -1627,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 @@ -1658,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/release/macos/ft2-clone-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_revision.h b/release/macos/ft2-clone-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_revision.h @@ -1,2 +1,2 @@ -#define SDL_REVISION "https://github.com/libsdl-org/SDL.git@b424665e0899769b200231ba943353a5fee1b6b6" +#define SDL_REVISION "https://github.com/libsdl-org/SDL.git@53dea9830964eee8b5c2a7ee0a65d6e268dc78a1" #define SDL_REVISION_NUMBER 0 diff --git a/release/macos/ft2-clone-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_stdinc.h b/release/macos/ft2-clone-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_stdinc.h @@ -234,6 +234,19 @@ typedef uint64_t Uint64; /* @} *//* Basic data types */ +/** + * \name Floating-point constants + */ +/* @{ */ + +#ifdef FLT_EPSILON +#define SDL_FLT_EPSILON FLT_EPSILON +#else +#define SDL_FLT_EPSILON 1.1920928955078125e-07F /* 0x0.000002p0 */ +#endif + +/* @} *//* Floating-point constants */ + /* Make sure we have macros for printing width-based integers. * <stdint.h> should define these but this is not true all platforms. * (for example win32) */ @@ -354,8 +367,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/release/macos/ft2-clone-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_system.h b/release/macos/ft2-clone-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_system.h @@ -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/release/macos/ft2-clone-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_syswm.h b/release/macos/ft2-clone-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_syswm.h @@ -298,6 +298,8 @@ struct SDL_SysWMinfo struct wl_egl_window *egl_window; /**< Wayland EGL window (native window) */ struct xdg_surface *xdg_surface; /**< Wayland xdg surface (window manager handle) */ struct xdg_toplevel *xdg_toplevel; /**< Wayland xdg toplevel role */ + struct xdg_popup *xdg_popup; /**< Wayland xdg popup role */ + struct xdg_positioner *xdg_positioner; /**< Wayland xdg positioner, for popup */ } wl; #endif #if defined(SDL_VIDEO_DRIVER_MIR) /* no longer available, left for API/ABI compatibility. Remove in 2.1! */ diff --git a/release/macos/ft2-clone-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_touch.h b/release/macos/ft2-clone-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_touch.h @@ -96,6 +96,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. * * \since This function is available since SDL 2.0.10. diff --git a/release/macos/ft2-clone-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_version.h b/release/macos/ft2-clone-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_version.h @@ -59,7 +59,7 @@ typedef struct SDL_version */ #define SDL_MAJOR_VERSION 2 #define SDL_MINOR_VERSION 0 -#define SDL_PATCHLEVEL 20 +#define SDL_PATCHLEVEL 22 /** * Macro to determine SDL version program was compiled against. diff --git a/release/macos/ft2-clone-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_video.h b/release/macos/ft2-clone-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_video.h @@ -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/release/macos/ft2-clone-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/begin_code.h b/release/macos/ft2-clone-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/begin_code.h @@ -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/release/macos/ft2-clone-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Resources/Info.plist b/release/macos/ft2-clone-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Resources/Info.plist @@ -3,7 +3,7 @@ <plist version="1.0"> <dict> <key>BuildMachineOSBuild</key> - <string>20G165</string> + <string>21E258</string> <key>CFBundleDevelopmentRegion</key> <string>English</string> <key>CFBundleExecutable</key> @@ -19,7 +19,7 @@ <key>CFBundlePackageType</key> <string>FMWK</string> <key>CFBundleShortVersionString</key> - <string>2.0.20</string> + <string>2.0.22</string> <key>CFBundleSignature</key> <string>SDLX</string> <key>CFBundleSupportedPlatforms</key> @@ -27,23 +27,23 @@ <string>MacOSX</string> </array> <key>CFBundleVersion</key> - <string>2.0.20</string> + <string>2.0.22</string> <key>DTCompiler</key> <string>com.apple.compilers.llvm.clang.1_0</string> <key>DTPlatformBuild</key> - <string>13C100</string> + <string>13E500a</string> <key>DTPlatformName</key> <string>macosx</string> <key>DTPlatformVersion</key> - <string>12.1</string> + <string>12.3</string> <key>DTSDKBuild</key> - <string>21C46</string> + <string>21E226</string> <key>DTSDKName</key> - <string>macosx12.1</string> + <string>macosx12.3</string> <key>DTXcode</key> - <string>1321</string> + <string>1331</string> <key>DTXcodeBuild</key> - <string>13C100</string> + <string>13E500a</string> <key>LSMinimumSystemVersion</key> <string>10.6</string> </dict> diff --git a/release/macos/ft2-clone-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Resources/default.metallib b/release/macos/ft2-clone-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Resources/default.metallib Binary files differ. diff --git a/release/macos/ft2-clone-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/SDL2 b/release/macos/ft2-clone-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/SDL2 Binary files differ. diff --git a/release/macos/ft2-clone-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/_CodeSignature/CodeResources b/release/macos/ft2-clone-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/_CodeSignature/CodeResources @@ -6,7 +6,7 @@ <dict> <key>Resources/Info.plist</key> <data> - WA5ECtp9JdaZLsWF+EWo7CT3rrk= + OxWHBbdJFecUEehMjei2Rc0U5Fs= </data> <key>Resources/License.txt</key> <data> @@ -18,7 +18,7 @@ </data> <key>Resources/default.metallib</key> <data> - 9r12z/bRcfzLTZHZq/lX6aEe2XQ= + 50m0avYLiIBc6a4gWqXN3tnFlpU= </data> </dict> <key>files2</key> @@ -60,11 +60,11 @@ <dict> <key>hash</key> <data> - 93MqcH4EqdPWPnTMGXxL+EOJ1xo= + 7xIqZ2CJnqsLqa0yju2jGLvXIT8= </data> <key>hash2</key> <data> - wLgXQ8c4VznJaqNYA0zPDOFM1QPEild7ge3OCZp3Gxw= + dZi1DsT1rqMBCQaMyiUIg0VhL2Bimi21vToZVSHzoHg= </data> </dict> <key>Headers/SDL_bits.h</key> @@ -82,11 +82,11 @@ <dict> <key>hash</key> <data> - 9bKJAWfPT5IMRUv3P60r38Qlk5E= + 5Pz0CTC9TqwrzCBl01YH4gZrs9Y= </data> <key>hash2</key> <data> - zxdtTSgsjgosnZmtk6KOYkLixD/aYeMdq8XobZSrhvM= + ZAgsP5xqXQisFDAE3DWRWGvUmP30Q0FqKtXhU9j9Pag= </data> </dict> <key>Headers/SDL_clipboard.h</key> @@ -104,11 +104,11 @@ <dict> <key>hash</key> <data> - LlONHAQS/oc0Y+ZJDfwuWh4emOw= + Olzb505P1HBEz25McJhmwDQxMts= </data> <key>hash2</key> <data> - eq/Osz5nEFVx550YlyQeJY0oEfTXsSpRxtL+NnKKs80= + byh+rm0uGGxRtARYzR/iUxLMCj+UXtIQwZpqzWTbCHU= </data> </dict> <key>Headers/SDL_config_macosx.h</key> @@ -148,11 +148,11 @@ <dict> <key>hash</key> <data> - jWZza0FD6WVvHt50mdtGSzr7isA= + hjZnlLj/BhnYauMLnPFLqv5ld+8= </data> <key>hash2</key> <data> - kj4Zvh0L+Op9C8lCCVXaWHDZ76yXbnGcE2NxytgYkNs= + UCdvUbA4LSqN8Agy5/Q6+flinRwg6e74eukmB8sT6EU= </data> </dict> <key>Headers/SDL_error.h</key> @@ -170,11 +170,11 @@ <dict> <key>hash</key> <data> - 8GlTQ8wp6CpiRx2dUU/pPaDkm7I= + b+C5YW7mW4CdkoYFIbkdxfghfd0= </data> <key>hash2</key> <data> - jrDXrLEV2gCPcOpeLQDmQ3r9ViGgpqCsffX5azFIvl8= + vGErGGPAOzP1ZoIRYWQZaWC7bP03jagORHaFJftUEiI= </data> </dict> <key>Headers/SDL_filesystem.h</key> @@ -192,11 +192,11 @@ <dict> <key>hash</key> <data> - 0Ice9FmYeLxpoh9gLatmirvExlE= + Qwyjs/bcCUzZvFafnydTTGb3940= </data> <key>hash2</key> <data> - x0koRreR719P+hObP+Nd0Fn35y/nRSXj01ndA6lJi+8= + ojhssavzsyV6wvnGfBKuPGyTxr0MAZg+VDGWA8Gmilc= </data> </dict> <key>Headers/SDL_gesture.h</key> @@ -236,33 +236,33 @@ <dict> <key>hash</key> <data> - +DUCuUk2GfTq2X1tMaaSrLvmjr0= + MNIKfPtJ4SewBtPWpU/h6TOtwSQ= </data> <key>hash2</key> <data> - CI6QVSuYJy1vlfo8Z4/uC+Fwfmma0vpTKE5QKbiJRNY= + aXw7nEIct7VTCTjuJNiNNRR6k/Itx+PRZLqNEtTKG2U= </data> </dict> <key>Headers/SDL_joystick.h</key> <dict> <key>hash</key> <data> - +pGWLidV41K8JtmZSGJnjhNpE6w= + GH2e05dwSwQ8iwknMqCRTWR/MbE= </data> <key>hash2</key> <data> - 91nzPYffummTrOqALonMzOv69/YYnTdwCdi/YEwdyqo= + 1++nAdLqleg2ivlLLskLor6ZJt6G/a2z1xaQxdpBI4Y= </data> </dict> <key>Headers/SDL_keyboard.h</key> <dict> <key>hash</key> <data> - 8UqudJ780aDNjRiVZaB8teHgHN0= + w8EdoupVBrDxx7IWS/DMFudkT7A= </data> <key>hash2</key> <data> - IgEc96O1dBg5fQpphYGdagTz2OTE4V7rCwiW4rnM5gk= + LtiaG0lVgcH29e+os6cGweWKblrxXFVb4EvP9/kzVWM= </data> </dict> <key>Headers/SDL_keycode.h</key> @@ -335,11 +335,11 @@ <dict> <key>hash</key> <data> - t6A+bvPeDhyPMiw/h1jzLrFvNYU= + yP5RcpTgmEI5xYVUhmsSXzNcpMo= </data> <key>hash2</key> <data> - HFdR1njmTz8V3sFiDEt2YbN+vnQ5np2VPfgYa/oaQmk= + jICsu4yIr5tUTA15x3BzYA25xK/3wIzMavVBzM2RzIw= </data> </dict> <key>Headers/SDL_misc.h</key> @@ -522,33 +522,33 @@ <dict> <key>hash</key> <data> - ATy0MGYXziJznQOi3bEHDzfNfKg= + ztC9bPrMYIWHuuIv6KDDe+k0mis= </data> <key>hash2</key> <data> - 30RDjz60gfkKo6cqSJWv+XlDT0+PRdSVrSVaYmXJMcw= + Nw4VuuH6sfXJ6SmFAAxWkXZNwpSyM93M0NhDcmrINfw= </data> </dict> <key>Headers/SDL_render.h</key> <dict> <key>hash</key> <data> - 148BmNO8l0zLrNJ6X3o++c7l2bo= + LYUqbTHT+nxZVu/W7ZLKDjtBnVI= </data> <key>hash2</key> <data> - 5lY1TQ1WnE4gup38mgR5Z5z4373ZLneb867zxcsJ5JA= + OLdAKEsl5+dofY5kGScL0SH22Qm56tenSq/r75YHJlw= </data> </dict> <key>Headers/SDL_revision.h</key> <dict> <key>hash</key> <data> - UskX0ujjAV97IfpqB3vbgGoCiyw= + OmV6TNE1P8Dm+ekO7PlOPkvpJJM= </data> <key>hash2</key> <data> - J1T25bDD9+ytTzaTYfEkuTsh8pnlPdB4RJFo+BqJax0= + N8c2dyfn8XOV6qOfJ3wvKHDejG3snUbYdTt3G3/xhUQ= </data> </dict> <key>Headers/SDL_rwops.h</key> @@ -599,11 +599,11 @@ <dict> <key>hash</key> <data> - Ow6oKGveLDE2aT0KxfSJs8/24UI= + EYOOaliKN3mXAL5afejG9kTy5+k= </data> <key>hash2</key> <data> - FcemYG+UGgvQJHVx/0aFkPxuDa99LnzzfyUvSM5AMAE= + 6od6OtLyHwzdV1pX2zr4Kzcet0I8NKfiB0Kv+Ml69Go= </data> </dict> <key>Headers/SDL_surface.h</key> @@ -621,22 +621,22 @@ <dict> <key>hash</key> <data> - ujlKZfzP309kUTXstQg359cq3dk= + S6sTGCcO3+vzldjaK1MKpAdpUwA= </data> <key>hash2</key> <data> - sMxQ9hx1mtMaJNUhOuygfDpQ3E+18X7QSVlQZigFXQk= + UDYoiSAVLHeQO4b2Ed+RnZFLklEJAsddB0wwBbrlVXw= </data> </dict> <key>Headers/SDL_syswm.h</key> <dict> <key>hash</key> <data> - 7YVFoB7fS5l7PdqmxsrhPziQj84= + c/yTWIUac7ruA/MxHCtFrpY99iY= </data> <key>hash2</key> <data> - fv7rkrGfIa4wRfnVvTZNfPtI6ZXg5LiD63A1Bw3LOsg= + u8ZMeDHauQkZOq0xta38z4KOR3Z+X1Bw/Gq6ldUm8S8= </data> </dict> <key>Headers/SDL_thread.h</key> @@ -665,11 +665,11 @@ <dict> <key>hash</key> <data> - ogBfxSNahOEzOjz+IHqs2haPd20= + 7uNU9A4qHZQB6CKh7zOjZt1w2cc= </data> <key>hash2</key> <data> - dHHrHfFgrQ+QTEuntgNsluAqNykwwr+3y3mW+ahc/ao= + 4TL6Yoim9zWJo4xXKZd/MZsrUIrNUvlZFpEuoMtOIlU= </data> </dict> <key>Headers/SDL_types.h</key> @@ -687,22 +687,22 @@ <dict> <key>hash</key> <data> - w50K/1c33V+ibF9et7A/PeNjKpg= + do5+x9XfCNHA4lphY05v8LLcu7s= </data> <key>hash2</key> <data> - +Aw5Y41y8rkDqZGz/BMzCeAVDRUOVdlX5dEHIBxNNLg= + i3TeLMhNerHPGUcZ7iHbxfBiDH0IxtBvejyZWWdtkOU= </data> </dict> <key>Headers/SDL_video.h</key> <dict> <key>hash</key> <data> - q0CoxPrnkRWpMWS/pIHyPhbSMCM= + 60Zzr8X2wpuq+vFcn77/RNTVGYY= </data> <key>hash2</key> <data> - DPvCDsIQY0QTiPeSMSbLRcQOWsT0oKupircD3OyJR3I= + Uzv2NcHWzsVBKVEJWlIPzEGu0hSLQIP8MM8xN98LNwE= </data> </dict> <key>Headers/SDL_vulkan.h</key> @@ -720,11 +720,11 @@ <dict> <key>hash</key> <data> - h8hZ7hTZOrnc0cFWYRvvTyUhGOU= + A52Lh/nQ4BliCI+RMHIt9xSD6Fs= </data> <key>hash2</key> <data> - qDNWZktosRzVPtpK9+6MkP+OIGQNUrIIpu7WU11cI7g= + KDdUdsUtYxmo0ZyQLNwOHuWTKFaJnujcoeF6edzp4SE= </data> </dict> <key>Headers/close_code.h</key> @@ -742,11 +742,11 @@ <dict> <key>hash</key> <data> - WA5ECtp9JdaZLsWF+EWo7CT3rrk= + OxWHBbdJFecUEehMjei2Rc0U5Fs= </data> <key>hash2</key> <data> - ui83Z8gNUOjU063vj/ucfMrkooeLR2eRAT4bCQscyyE= + ScLuGB7K21JNtYbbGu7tXZiTvB3bCi8bFdDLJGAMcOs= </data> </dict> <key>Resources/License.txt</key> @@ -775,11 +775,11 @@ <dict> <key>hash</key> <data> - 9r12z/bRcfzLTZHZq/lX6aEe2XQ= + 50m0avYLiIBc6a4gWqXN3tnFlpU= </data> <key>hash2</key> <data> - wLvh//hzxtz/3NO439f1+KwR8WlN6SmtrhisJLt1J48= + w8jS3DIw3CKDRfJsmiA4MWFVPhdpi2zi+WEO1Zfw8+8= </data> </dict> </dict> diff --git a/release/win32/SDL2.dll b/release/win32/SDL2.dll Binary files differ. diff --git a/release/win64/SDL2.dll b/release/win64/SDL2.dll Binary files differ. diff --git a/vs2019_project/ft2-clone/SDL2.dll b/vs2019_project/ft2-clone/SDL2.dll Binary files differ. diff --git a/vs2019_project/ft2-clone/sdl/include/SDL2/SDL_audio.h b/vs2019_project/ft2-clone/sdl/include/SDL2/SDL_audio.h @@ -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/vs2019_project/ft2-clone/sdl/include/SDL2/SDL_blendmode.h b/vs2019_project/ft2-clone/sdl/include/SDL2/SDL_blendmode.h @@ -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/vs2019_project/ft2-clone/sdl/include/SDL2/SDL_config.h b/vs2019_project/ft2-clone/sdl/include/SDL2/SDL_config.h @@ -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,6 +104,7 @@ 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 diff --git a/vs2019_project/ft2-clone/sdl/include/SDL2/SDL_endian.h b/vs2019_project/ft2-clone/sdl/include/SDL2/SDL_endian.h @@ -65,6 +65,15 @@ _m_prefetch(void *__P) #elif defined(__FreeBSD__) || defined(__NetBSD__) #include <sys/endian.h> #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/vs2019_project/ft2-clone/sdl/include/SDL2/SDL_events.h b/vs2019_project/ft2-clone/sdl/include/SDL2/SDL_events.h @@ -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/vs2019_project/ft2-clone/sdl/include/SDL2/SDL_gamecontroller.h b/vs2019_project/ft2-clone/sdl/include/SDL2/SDL_gamecontroller.h @@ -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/vs2019_project/ft2-clone/sdl/include/SDL2/SDL_hints.h b/vs2019_project/ft2-clone/sdl/include/SDL2/SDL_hints.h @@ -413,6 +413,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. * * SDL can try to accelerate the SDL screen surface by using streaming @@ -567,6 +580,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" @@ -784,6 +822,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 * @@ -887,6 +934,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 * * This variable can be set to the following values: @@ -923,6 +986,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. * * This hint only applies to Unix-like platforms, and should set before @@ -1279,6 +1355,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. * @@ -1388,6 +1476,20 @@ extern "C" { #define SDL_HINT_VIDEO_WAYLAND_ALLOW_LIBDECOR "SDL_VIDEO_WAYLAND_ALLOW_LIBDECOR" /** + * \brief A variable controlling whether the libdecor Wayland backend is preferred over native decrations. + * + * When this hint is set, libdecor will be used to provide window decorations, even if xdg-decoration is + * available. (Note that, by default, libdecor will use xdg-decoration itself if available). + * + * This variable can be set to the following values: + * "0" - libdecor is enabled only if server-side decorations are unavailable. + * "1" - libdecor is always enabled if available. + * + * libdecor is used over xdg-shell when xdg-decoration protocol is unavailable. + */ +#define SDL_HINT_VIDEO_WAYLAND_PREFER_LIBDECOR "SDL_VIDEO_WAYLAND_PREFER_LIBDECOR" + +/** * \brief A variable that is the address of another SDL_Window* (as a hex string formatted with "%p"). * * If this hint is set before SDL_CreateWindowFrom() and the SDL_Window* it is set to has @@ -1407,6 +1509,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 * * SDL has EGL and OpenGL ES2 support on Windows via the ANGLE project. It @@ -1824,6 +1948,97 @@ 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 A variable that decides what video backend to use. + * + * By default, SDL will try all available video backends in a reasonable + * order until it finds one that can work, but this hint allows the app + * or user to force a specific target, such as "x11" if, say, you are + * on Wayland but want to try talking to the X server instead. + * + * This functionality has existed since SDL 2.0.0 (indeed, before that) + * but before 2.0.22 this was an environment variable only. In 2.0.22, + * it was upgraded to a full SDL hint, so you can set the environment + * variable as usual or programatically set the hint with SDL_SetHint, + * which won't propagate to child processes. + * + * The default value is unset, in which case SDL will try to figure out + * the best video backend on your behalf. This hint needs to be set + * before SDL_Init() is called to be useful. + * + * This hint is available since SDL 2.0.22. Before then, you could set + * the environment variable to get the same effect. + */ +#define SDL_HINT_VIDEODRIVER "SDL_VIDEODRIVER" + +/** + * \brief A variable that decides what audio backend to use. + * + * By default, SDL will try all available audio backends in a reasonable + * order until it finds one that can work, but this hint allows the app + * or user to force a specific target, such as "alsa" if, say, you are + * on PulseAudio but want to try talking to the lower level instead. + * + * This functionality has existed since SDL 2.0.0 (indeed, before that) + * but before 2.0.22 this was an environment variable only. In 2.0.22, + * it was upgraded to a full SDL hint, so you can set the environment + * variable as usual or programatically set the hint with SDL_SetHint, + * which won't propagate to child processes. + * + * The default value is unset, in which case SDL will try to figure out + * the best audio backend on your behalf. This hint needs to be set + * before SDL_Init() is called to be useful. + * + * This hint is available since SDL 2.0.22. Before then, you could set + * the environment variable to get the same effect. + */ +#define SDL_HINT_AUDIODRIVER "SDL_AUDIODRIVER" + /** * \brief An enumeration of hint priorities diff --git a/vs2019_project/ft2-clone/sdl/include/SDL2/SDL_joystick.h b/vs2019_project/ft2-clone/sdl/include/SDL2/SDL_joystick.h @@ -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/vs2019_project/ft2-clone/sdl/include/SDL2/SDL_keyboard.h b/vs2019_project/ft2-clone/sdl/include/SDL2/SDL_keyboard.h @@ -269,8 +269,29 @@ 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/vs2019_project/ft2-clone/sdl/include/SDL2/SDL_metal.h b/vs2019_project/ft2-clone/sdl/include/SDL2/SDL_metal.h @@ -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/vs2019_project/ft2-clone/sdl/include/SDL2/SDL_rect.h b/vs2019_project/ft2-clone/sdl/include/SDL2/SDL_rect.h @@ -54,8 +54,8 @@ typedef struct SDL_Point /** * The structure that defines a point (floating point) * - * \sa SDL_EnclosePoints - * \sa SDL_PointInRect + * \sa SDL_EncloseFPoints + * \sa SDL_PointInFRect */ typedef struct SDL_FPoint { @@ -71,6 +71,7 @@ typedef struct SDL_FPoint * \sa SDL_RectEquals * \sa SDL_HasIntersection * \sa SDL_IntersectRect + * \sa SDL_IntersectRectAndLine * \sa SDL_UnionRect * \sa SDL_EnclosePoints */ @@ -83,6 +84,16 @@ typedef struct SDL_Rect /** * A rectangle, with the origin at the upper left (floating point). + * + * \sa SDL_FRectEmpty + * \sa SDL_FRectEquals + * \sa SDL_FRectEqualsEpsilon + * \sa SDL_HasIntersectionF + * \sa SDL_IntersectFRect + * \sa SDL_IntersectFRectAndLine + * \sa SDL_UnionFRect + * \sa SDL_EncloseFPoints + * \sa SDL_PointInFRect */ typedef struct SDL_FRect { @@ -213,6 +224,147 @@ 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, within some given epsilon. + * + * \since This function is available since SDL 2.0.22. + */ +SDL_FORCE_INLINE SDL_bool SDL_FRectEqualsEpsilon(const SDL_FRect *a, const SDL_FRect *b, const float epsilon) +{ + return (a && b && ((a == b) || + ((SDL_fabs(a->x - b->x) <= epsilon) && + (SDL_fabs(a->y - b->y) <= epsilon) && + (SDL_fabs(a->w - b->w) <= epsilon) && + (SDL_fabs(a->h - b->h) <= epsilon)))) + ? SDL_TRUE : SDL_FALSE; +} + +/** + * Returns true if the two rectangles are equal, using a default epsilon. + * + * \since This function is available since SDL 2.0.22. + */ +SDL_FORCE_INLINE SDL_bool SDL_FRectEquals(const SDL_FRect *a, const SDL_FRect *b) +{ + return SDL_FRectEqualsEpsilon(a, b, SDL_FLT_EPSILON); +} + +/** + * 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/vs2019_project/ft2-clone/sdl/include/SDL2/SDL_render.h b/vs2019_project/ft2-clone/sdl/include/SDL2/SDL_render.h @@ -262,6 +262,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. * * \param renderer the 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. @@ -1627,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 @@ -1658,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/vs2019_project/ft2-clone/sdl/include/SDL2/SDL_revision.h b/vs2019_project/ft2-clone/sdl/include/SDL2/SDL_revision.h @@ -1,2 +1,2 @@ -#define SDL_REVISION "https://github.com/libsdl-org/SDL.git@b424665e0899769b200231ba943353a5fee1b6b6" +#define SDL_REVISION "https://github.com/libsdl-org/SDL.git@53dea9830964eee8b5c2a7ee0a65d6e268dc78a1" #define SDL_REVISION_NUMBER 0 diff --git a/vs2019_project/ft2-clone/sdl/include/SDL2/SDL_stdinc.h b/vs2019_project/ft2-clone/sdl/include/SDL2/SDL_stdinc.h @@ -234,6 +234,19 @@ typedef uint64_t Uint64; /* @} *//* Basic data types */ +/** + * \name Floating-point constants + */ +/* @{ */ + +#ifdef FLT_EPSILON +#define SDL_FLT_EPSILON FLT_EPSILON +#else +#define SDL_FLT_EPSILON 0.0000000001f /* 8bitbubsy: had to modify this for VC... */ +#endif + +/* @} *//* Floating-point constants */ + /* Make sure we have macros for printing width-based integers. * <stdint.h> should define these but this is not true all platforms. * (for example win32) */ @@ -354,8 +367,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/vs2019_project/ft2-clone/sdl/include/SDL2/SDL_system.h b/vs2019_project/ft2-clone/sdl/include/SDL2/SDL_system.h @@ -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/vs2019_project/ft2-clone/sdl/include/SDL2/SDL_syswm.h b/vs2019_project/ft2-clone/sdl/include/SDL2/SDL_syswm.h @@ -298,6 +298,8 @@ struct SDL_SysWMinfo struct wl_egl_window *egl_window; /**< Wayland EGL window (native window) */ struct xdg_surface *xdg_surface; /**< Wayland xdg surface (window manager handle) */ struct xdg_toplevel *xdg_toplevel; /**< Wayland xdg toplevel role */ + struct xdg_popup *xdg_popup; /**< Wayland xdg popup role */ + struct xdg_positioner *xdg_positioner; /**< Wayland xdg positioner, for popup */ } wl; #endif #if defined(SDL_VIDEO_DRIVER_MIR) /* no longer available, left for API/ABI compatibility. Remove in 2.1! */ diff --git a/vs2019_project/ft2-clone/sdl/include/SDL2/SDL_touch.h b/vs2019_project/ft2-clone/sdl/include/SDL2/SDL_touch.h @@ -96,6 +96,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. * * \since This function is available since SDL 2.0.10. diff --git a/vs2019_project/ft2-clone/sdl/include/SDL2/SDL_version.h b/vs2019_project/ft2-clone/sdl/include/SDL2/SDL_version.h @@ -59,7 +59,7 @@ typedef struct SDL_version */ #define SDL_MAJOR_VERSION 2 #define SDL_MINOR_VERSION 0 -#define SDL_PATCHLEVEL 20 +#define SDL_PATCHLEVEL 22 /** * Macro to determine SDL version program was compiled against. diff --git a/vs2019_project/ft2-clone/sdl/include/SDL2/SDL_video.h b/vs2019_project/ft2-clone/sdl/include/SDL2/SDL_video.h @@ -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/vs2019_project/ft2-clone/sdl/include/SDL2/begin_code.h b/vs2019_project/ft2-clone/sdl/include/SDL2/begin_code.h @@ -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/vs2019_project/ft2-clone/sdl/lib/SDL2.lib b/vs2019_project/ft2-clone/sdl/lib/SDL2.lib Binary files differ. diff --git a/vs2019_project/ft2-clone/sdl/lib/SDL2main.lib b/vs2019_project/ft2-clone/sdl/lib/SDL2main.lib Binary files differ. diff --git a/vs2019_project/ft2-clone/sdl/lib64/SDL2.lib b/vs2019_project/ft2-clone/sdl/lib64/SDL2.lib Binary files differ. diff --git a/vs2019_project/ft2-clone/sdl/lib64/SDL2main.lib b/vs2019_project/ft2-clone/sdl/lib64/SDL2main.lib Binary files differ. diff --git a/vs2019_project/x64/Debug/SDL2.dll b/vs2019_project/x64/Debug/SDL2.dll Binary files differ.