diff --git a/pt_pal_editor/release/macos/pt_pal_editor-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_atomic.h b/pt_pal_editor/release/macos/pt_pal_editor-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_atomic.h index af40c0e..56dab7e 100644 --- a/pt_pal_editor/release/macos/pt_pal_editor-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_atomic.h +++ b/pt_pal_editor/release/macos/pt_pal_editor-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_atomic.h @@ -249,9 +249,8 @@ typedef void (*SDL_KernelMemoryBarrierFunc)(); #elif defined(_MSC_VER) && (defined(_M_ARM) || defined(_M_ARM64)) #define SDL_CPUPauseInstruction() __yield() #elif defined(__WATCOMC__) && defined(__386__) - /* watcom assembler rejects PAUSE if CPU < i686, and it refuses REP NOP as an invalid combination. Hardcode the bytes. */ extern __inline void SDL_CPUPauseInstruction(void); - #pragma aux SDL_CPUPauseInstruction = "db 0f3h,90h" + #pragma aux SDL_CPUPauseInstruction = ".686p" ".xmm2" "pause" #else #define SDL_CPUPauseInstruction() #endif diff --git a/pt_pal_editor/release/macos/pt_pal_editor-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_audio.h b/pt_pal_editor/release/macos/pt_pal_editor-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_audio.h index 98a833c..2eeb542 100644 --- a/pt_pal_editor/release/macos/pt_pal_editor-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_audio.h +++ b/pt_pal_editor/release/macos/pt_pal_editor-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_audio.h @@ -169,13 +169,13 @@ typedef void (SDLCALL * SDL_AudioCallback) (void *userdata, Uint8 * stream, * The calculated values in this structure are calculated by SDL_OpenAudio(). * * For multi-channel audio, the default SDL channel mapping is: - * 2: FL FR (stereo) - * 3: FL FR LFE (2.1 surround) - * 4: FL FR BL BR (quad) - * 5: FL FR LFE BL BR (4.1 surround) - * 6: FL FR FC LFE SL SR (5.1 surround - last two can also be BL BR) - * 7: FL FR FC LFE BC SL SR (6.1 surround) - * 8: FL FR FC LFE BL BR SL SR (7.1 surround) + * 2: FL FR (stereo) + * 3: FL FR LFE (2.1 surround) + * 4: FL FR BL BR (quad) + * 5: FL FR LFE BL BR (4.1 surround) + * 6: FL FR FC LFE SL SR (5.1 surround - last two can also be BL BR) + * 7: FL FR FC LFE BC SL SR (6.1 surround) + * 8: FL FR FC LFE BL BR SL SR (7.1 surround) */ typedef struct SDL_AudioSpec { diff --git a/pt_pal_editor/release/macos/pt_pal_editor-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_blendmode.h b/pt_pal_editor/release/macos/pt_pal_editor-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_blendmode.h index 67e37d6..cdd84e7 100644 --- a/pt_pal_editor/release/macos/pt_pal_editor-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_blendmode.h +++ b/pt_pal_editor/release/macos/pt_pal_editor-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_blendmode.h @@ -52,7 +52,7 @@ typedef enum dstA = dstA */ SDL_BLENDMODE_MUL = 0x00000008, /**< color multiply dstRGB = (srcRGB * dstRGB) + (dstRGB * (1-srcA)) - dstA = (srcA * dstA) + (dstA * (1-srcA)) */ + dstA = dstA */ SDL_BLENDMODE_INVALID = 0x7FFFFFFF /* Additional custom blend modes can be returned by SDL_ComposeCustomBlendMode() */ diff --git a/pt_pal_editor/release/macos/pt_pal_editor-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_endian.h b/pt_pal_editor/release/macos/pt_pal_editor-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_endian.h index 219ba8a..62f7ae4 100644 --- a/pt_pal_editor/release/macos/pt_pal_editor-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_endian.h +++ b/pt_pal_editor/release/macos/pt_pal_editor-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_endian.h @@ -140,7 +140,7 @@ extern "C" { #if HAS_BUILTIN_BSWAP16 #define SDL_Swap16(x) __builtin_bswap16(x) -#elif defined(_MSC_VER) && (_MSC_VER >= 1400) +#elif (defined(_MSC_VER) && (_MSC_VER >= 1400)) && !defined(__ICL) #pragma intrinsic(_byteswap_ushort) #define SDL_Swap16(x) _byteswap_ushort(x) #elif defined(__i386__) && !HAS_BROKEN_BSWAP @@ -189,7 +189,7 @@ SDL_Swap16(Uint16 x) #if HAS_BUILTIN_BSWAP32 #define SDL_Swap32(x) __builtin_bswap32(x) -#elif defined(_MSC_VER) && (_MSC_VER >= 1400) +#elif (defined(_MSC_VER) && (_MSC_VER >= 1400)) && !defined(__ICL) #pragma intrinsic(_byteswap_ulong) #define SDL_Swap32(x) _byteswap_ulong(x) #elif defined(__i386__) && !HAS_BROKEN_BSWAP @@ -241,7 +241,7 @@ SDL_Swap32(Uint32 x) #if HAS_BUILTIN_BSWAP64 #define SDL_Swap64(x) __builtin_bswap64(x) -#elif defined(_MSC_VER) && (_MSC_VER >= 1400) +#elif (defined(_MSC_VER) && (_MSC_VER >= 1400)) && !defined(__ICL) #pragma intrinsic(_byteswap_uint64) #define SDL_Swap64(x) _byteswap_uint64(x) #elif defined(__i386__) && !HAS_BROKEN_BSWAP diff --git a/pt_pal_editor/release/macos/pt_pal_editor-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_gamecontroller.h b/pt_pal_editor/release/macos/pt_pal_editor-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_gamecontroller.h index 3afca9b..266e706 100644 --- a/pt_pal_editor/release/macos/pt_pal_editor-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_gamecontroller.h +++ b/pt_pal_editor/release/macos/pt_pal_editor-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_gamecontroller.h @@ -724,10 +724,10 @@ typedef enum SDL_CONTROLLER_BUTTON_DPAD_LEFT, SDL_CONTROLLER_BUTTON_DPAD_RIGHT, SDL_CONTROLLER_BUTTON_MISC1, /* Xbox Series X share button, PS5 microphone button, Nintendo Switch Pro capture button, Amazon Luna microphone button */ - SDL_CONTROLLER_BUTTON_PADDLE1, /* Xbox Elite paddle P1 */ - SDL_CONTROLLER_BUTTON_PADDLE2, /* Xbox Elite paddle P3 */ - SDL_CONTROLLER_BUTTON_PADDLE3, /* Xbox Elite paddle P2 */ - SDL_CONTROLLER_BUTTON_PADDLE4, /* Xbox Elite paddle P4 */ + SDL_CONTROLLER_BUTTON_PADDLE1, /* Xbox Elite paddle P1 (upper left, facing the back) */ + SDL_CONTROLLER_BUTTON_PADDLE2, /* Xbox Elite paddle P3 (upper right, facing the back) */ + SDL_CONTROLLER_BUTTON_PADDLE3, /* Xbox Elite paddle P2 (lower left, facing the back) */ + SDL_CONTROLLER_BUTTON_PADDLE4, /* Xbox Elite paddle P4 (lower right, facing the back) */ SDL_CONTROLLER_BUTTON_TOUCHPAD, /* PS4/PS5 touchpad button */ SDL_CONTROLLER_BUTTON_MAX } SDL_GameControllerButton; diff --git a/pt_pal_editor/release/macos/pt_pal_editor-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_hints.h b/pt_pal_editor/release/macos/pt_pal_editor-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_hints.h index 4b679c1..ba965e3 100644 --- a/pt_pal_editor/release/macos/pt_pal_editor-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_hints.h +++ b/pt_pal_editor/release/macos/pt_pal_editor-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_hints.h @@ -92,7 +92,7 @@ extern "C" { * By default this hint is not set and the APK expansion files are not searched. */ #define SDL_HINT_ANDROID_APK_EXPANSION_MAIN_FILE_VERSION "SDL_ANDROID_APK_EXPANSION_MAIN_FILE_VERSION" - + /** * \brief Android APK expansion patch file version. Should be a string number like "1", "2" etc. * @@ -132,13 +132,13 @@ extern "C" { * \brief A variable to control whether we trap the Android back button to handle it manually. * This is necessary for the right mouse button to work on some Android devices, or * to be able to trap the back button for use in your code reliably. If set to true, - * the back button will show up as an SDL_KEYDOWN / SDL_KEYUP pair with a keycode of + * the back button will show up as an SDL_KEYDOWN / SDL_KEYUP pair with a keycode of * SDL_SCANCODE_AC_BACK. * * The variable can be set to the following values: * "0" - Back button will be handled as usual for system. (default) * "1" - Back button will be trapped, allowing you to handle the key press - * manually. (This will also let right mouse click work on systems + * manually. (This will also let right mouse click work on systems * where the right mouse button functions as back.) * * The value of this hint is used at runtime, so it can be changed at any time. @@ -147,7 +147,7 @@ extern "C" { /** * \brief Specify an application name. - * + * * This hint lets you specify the application name sent to the OS when * required. For example, this will often appear in volume control applets for * audio streams, and in lists of applications which are inhibiting the @@ -377,6 +377,17 @@ extern "C" { */ #define SDL_HINT_EMSCRIPTEN_KEYBOARD_ELEMENT "SDL_EMSCRIPTEN_KEYBOARD_ELEMENT" +/** + * \brief A variable that controls whether the on-screen keyboard should be shown when text input is active + * + * The variable can be set to the following values: + * "0" - Do not show the on-screen keyboard + * "1" - Show the on-screen keyboard + * + * The default value is "1". This hint must be set before text input is activated. + */ +#define SDL_HINT_ENABLE_SCREEN_KEYBOARD "SDL_ENABLE_SCREEN_KEYBOARD" + /** * \brief A variable that controls whether Steam Controllers should be exposed using the SDL joystick and game controller APIs * @@ -507,7 +518,7 @@ extern "C" { /** * \brief If set, game controller face buttons report their values according to their labels instead of their positional layout. - * + * * For example, on Nintendo Switch controllers, normally you'd get: * * (Y) @@ -569,9 +580,9 @@ extern "C" { * * The variable can be set to the following values: * "0" - SDL_TEXTEDITING events are sent, and it is the application's - * responsibility to render the text from these events and + * responsibility to render the text from these events and * differentiate it somehow from committed text. (default) - * "1" - If supported by the IME then SDL_TEXTEDITING events are not sent, + * "1" - If supported by the IME then SDL_TEXTEDITING events are not sent, * and text that is being composed will be rendered in its own UI. */ #define SDL_HINT_IME_INTERNAL_EDITING "SDL_IME_INTERNAL_EDITING" @@ -1310,6 +1321,8 @@ extern "C" { * * This variable can be one of the following values: * "primary" (default), "portrait", "landscape", "inverted-portrait", "inverted-landscape" + * + * Since SDL 2.0.22 this variable accepts a comma-separated list of values above. */ #define SDL_HINT_QTWAYLAND_CONTENT_ORIENTATION "SDL_QTWAYLAND_CONTENT_ORIENTATION" @@ -1495,7 +1508,7 @@ extern "C" { * disabled. You should use a string that describes what your program is doing * (and, therefore, why the screensaver is disabled). For example, "Playing a * game" or "Watching a video". - * + * * Setting this to "" or leaving it unset will have SDL use a reasonable * default: "Playing a game" or something similar. * @@ -1509,13 +1522,13 @@ extern "C" { * On some platforms, like Linux, a realtime priority thread may be subject to restrictions * that require special handling by the application. This hint exists to let SDL know that * the app is prepared to handle said restrictions. - * + * * On Linux, SDL will apply the following configuration to any thread that becomes realtime: * * The SCHED_RESET_ON_FORK bit will be set on the scheduling policy, * * An RLIMIT_RTTIME budget will be configured to the rtkit specified limit. * * Exceeding this limit will result in the kernel sending SIGKILL to the app, * * Refer to the man pages for more information. - * + * * This variable can be set to the following values: * "0" - default platform specific behaviour * "1" - Force SDL_THREAD_PRIORITY_TIME_CRITICAL to a realtime scheduling policy @@ -1603,7 +1616,7 @@ extern "C" { #define SDL_HINT_TV_REMOTE_AS_JOYSTICK "SDL_TV_REMOTE_AS_JOYSTICK" /** - * \brief A variable controlling whether the screensaver is enabled. + * \brief A variable controlling whether the screensaver is enabled. * * This variable can be set to the following values: * "0" - Disable screensaver @@ -1616,7 +1629,7 @@ extern "C" { /** * \brief Tell the video driver that we only want a double buffer. * - * By default, most lowlevel 2D APIs will use a triple buffer scheme that + * By default, most lowlevel 2D APIs will use a triple buffer scheme that * wastes no CPU time on waiting for vsync after issuing a flip, but * introduces a frame of latency. On the other hand, using a double buffer * scheme instead is recommended for cases where low latency is an important @@ -1747,9 +1760,9 @@ extern "C" { /** * \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 -* SDL_WINDOW_OPENGL set (and running on WGL only, currently), then two things will occur on the newly +* SDL_WINDOW_OPENGL set (and running on WGL only, currently), then two things will occur on the newly * created SDL_Window: * * 1. Its pixel format will be set to the same pixel format as this SDL_Window. This is @@ -1815,13 +1828,13 @@ extern "C" { /** * \brief A variable controlling whether the X11 _NET_WM_BYPASS_COMPOSITOR hint should be used. - * + * * This variable can be set to the following values: * "0" - Disable _NET_WM_BYPASS_COMPOSITOR * "1" - Enable _NET_WM_BYPASS_COMPOSITOR - * + * * By default SDL will use _NET_WM_BYPASS_COMPOSITOR - * + * */ #define SDL_HINT_VIDEO_X11_NET_WM_BYPASS_COMPOSITOR "SDL_VIDEO_X11_NET_WM_BYPASS_COMPOSITOR" @@ -1955,7 +1968,29 @@ extern "C" { #define SDL_HINT_WINDOWS_DISABLE_THREAD_NAMING "SDL_WINDOWS_DISABLE_THREAD_NAMING" /** - * \brief A variable controlling whether the windows message loop is processed by SDL + * \brief Controls whether menus can be opened with their keyboard shortcut (Alt+mnemonic). + * + * If the mnemonics are enabled, then menus can be opened by pressing the Alt + * key and the corresponding mnemonic (for example, Alt+F opens the File menu). + * However, in case an invalid mnemonic is pressed, Windows makes an audible + * beep to convey that nothing happened. This is true even if the window has + * no menu at all! + * + * Because most SDL applications don't have menus, and some want to use the Alt + * key for other purposes, SDL disables mnemonics (and the beeping) by default. + * + * Note: This also affects keyboard events: with mnemonics enabled, when a + * menu is opened from the keyboard, you will not receive a KEYUP event for + * the mnemonic key, and *might* not receive one for Alt. + * + * This variable can be set to the following values: + * "0" - Alt+mnemonic does nothing, no beeping. (default) + * "1" - Alt+mnemonic opens menus, invalid mnemonics produce a beep. + */ +#define SDL_HINT_WINDOWS_ENABLE_MENU_MNEMONICS "SDL_WINDOWS_ENABLE_MENU_MNEMONICS" + +/** + * \brief A variable controlling whether the windows message loop is processed by SDL * * This variable can be set to the following values: * "0" - The window message loop is not run @@ -1996,7 +2031,7 @@ extern "C" { #define SDL_HINT_WINDOWS_FORCE_SEMAPHORE_KERNEL "SDL_WINDOWS_FORCE_SEMAPHORE_KERNEL" /** - * \brief A variable to specify custom icon resource id from RC file on Windows platform + * \brief A variable to specify custom icon resource id from RC file on Windows platform */ #define SDL_HINT_WINDOWS_INTRESOURCE_ICON "SDL_WINDOWS_INTRESOURCE_ICON" #define SDL_HINT_WINDOWS_INTRESOURCE_ICON_SMALL "SDL_WINDOWS_INTRESOURCE_ICON_SMALL" @@ -2035,16 +2070,16 @@ extern "C" { * * This hint must be set before initializing the video subsystem. * - * The main purpose of declaring DPI awareness is to disable OS bitmap scaling of SDL windows on monitors with + * The main purpose of declaring DPI awareness is to disable OS bitmap scaling of SDL windows on monitors with * a DPI scale factor. - * + * * This hint is equivalent to requesting DPI awareness via external means (e.g. calling SetProcessDpiAwarenessContext) * and does not cause SDL to use a virtualized coordinate system, so it will generally give you 1 SDL coordinate = 1 pixel * even on high-DPI displays. - * + * * For more information, see: * https://docs.microsoft.com/en-us/windows/win32/hidpi/high-dpi-desktop-application-development-on-windows - * + * * This variable can be set to the following values: * "" - Do not change the DPI awareness (default). * "unaware" - Declare the process as DPI unaware. (Windows 8.1 and later). @@ -2062,16 +2097,16 @@ extern "C" { /** * \brief Uses DPI-scaled points as the SDL coordinate system on Windows. - * + * * This changes the SDL coordinate system units to be DPI-scaled points, rather than pixels everywhere. * This means windows will be appropriately sized, even when created on high-DPI displays with scaling. - * + * * e.g. requesting a 640x480 window from SDL, on a display with 125% scaling in Windows display settings, * will create a window with an 800x600 client area (in pixels). * * Setting this to "1" implicitly requests process DPI awareness (setting SDL_WINDOWS_DPI_AWARENESS is unnecessary), * and forces SDL_WINDOW_ALLOW_HIGHDPI on all windows. - * + * * This variable can be set to the following values: * "0" - SDL coordinates equal Windows coordinates. No automatic window resizing when dragging * between monitors with different scale factors (unless this is performed by @@ -2082,7 +2117,7 @@ extern "C" { #define SDL_HINT_WINDOWS_DPI_SCALING "SDL_WINDOWS_DPI_SCALING" /** - * \brief A variable controlling whether the window frame and title bar are interactive when the cursor is hidden + * \brief A variable controlling whether the window frame and title bar are interactive when the cursor is hidden * * This variable can be set to the following values: * "0" - The window frame is not interactive when the cursor is hidden (no move, resize, etc) @@ -2093,7 +2128,7 @@ extern "C" { #define SDL_HINT_WINDOW_FRAME_USABLE_WHILE_CURSOR_HIDDEN "SDL_WINDOW_FRAME_USABLE_WHILE_CURSOR_HIDDEN" /** -* \brief A variable controlling whether the window is activated when the SDL_ShowWindow function is called +* \brief A variable controlling whether the window is activated when the SDL_ShowWindow function is called * * This variable can be set to the following values: * "0" - The window is activated when the SDL_ShowWindow function is called diff --git a/pt_pal_editor/release/macos/pt_pal_editor-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_joystick.h b/pt_pal_editor/release/macos/pt_pal_editor-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_joystick.h index ace6d8e..8c05fdb 100644 --- a/pt_pal_editor/release/macos/pt_pal_editor-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_joystick.h +++ b/pt_pal_editor/release/macos/pt_pal_editor-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_joystick.h @@ -44,6 +44,7 @@ #include #include #include +#include #include /* Set up for C function definitions, even when using C++ */ @@ -66,6 +67,9 @@ extern "C" { /** * The joystick structure used to identify an SDL joystick */ +#ifdef SDL_THREAD_SAFETY_ANALYSIS +extern SDL_mutex *SDL_joystick_lock; +#endif struct _SDL_Joystick; typedef struct _SDL_Joystick SDL_Joystick; @@ -131,7 +135,7 @@ typedef enum * * \since This function is available since SDL 2.0.7. */ -extern DECLSPEC void SDLCALL SDL_LockJoysticks(void); +extern DECLSPEC void SDLCALL SDL_LockJoysticks(void) SDL_ACQUIRE(SDL_joystick_lock); /** @@ -146,7 +150,7 @@ extern DECLSPEC void SDLCALL SDL_LockJoysticks(void); * * \since This function is available since SDL 2.0.7. */ -extern DECLSPEC void SDLCALL SDL_UnlockJoysticks(void); +extern DECLSPEC void SDLCALL SDL_UnlockJoysticks(void) SDL_RELEASE(SDL_joystick_lock); /** * Count the number of joysticks attached to the system. @@ -284,13 +288,12 @@ extern DECLSPEC SDL_JoystickType SDLCALL SDL_JoystickGetDeviceType(int device_in /** * Get the instance ID of a joystick. * - * This can be called before any joysticks are opened. If the index is out of - * range, this function will return -1. + * This can be called before any joysticks are opened. * * \param device_index the index of the joystick to query (the N'th joystick * on the system * \returns the instance id of the selected joystick. If called on an invalid - * index, this function returns zero + * index, this function returns -1. * * \since This function is available since SDL 2.0.6. */ diff --git a/pt_pal_editor/release/macos/pt_pal_editor-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_keycode.h b/pt_pal_editor/release/macos/pt_pal_editor-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_keycode.h index 0fef3a1..cc08478 100644 --- a/pt_pal_editor/release/macos/pt_pal_editor-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_keycode.h +++ b/pt_pal_editor/release/macos/pt_pal_editor-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_keycode.h @@ -40,7 +40,7 @@ * an SDLK_* constant for those keys that do not generate characters. * * A special exception is the number keys at the top of the keyboard which - * always map to SDLK_0...SDLK_9, regardless of layout. + * map to SDLK_0...SDLK_9 on AZERTY layouts. */ typedef Sint32 SDL_Keycode; diff --git a/pt_pal_editor/release/macos/pt_pal_editor-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_main.h b/pt_pal_editor/release/macos/pt_pal_editor-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_main.h index f6edd26..8e938ca 100644 --- a/pt_pal_editor/release/macos/pt_pal_editor-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_main.h +++ b/pt_pal_editor/release/macos/pt_pal_editor-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_main.h @@ -263,6 +263,13 @@ extern DECLSPEC int SDLCALL SDL_UIKitRunApp(int argc, char *argv[], SDL_main_fun */ extern DECLSPEC int SDLCALL SDL_GDKRunApp(SDL_main_func mainFunction, void *reserved); +/** + * Callback from the application to let the suspend continue. + * + * \since This function is available since SDL 2.28.0. + */ +extern DECLSPEC void SDLCALL SDL_GDKSuspendComplete(void); + #endif /* __GDK__ */ #ifdef __cplusplus diff --git a/pt_pal_editor/release/macos/pt_pal_editor-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_mouse.h b/pt_pal_editor/release/macos/pt_pal_editor-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_mouse.h index 89186ab..5b224ec 100644 --- a/pt_pal_editor/release/macos/pt_pal_editor-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_mouse.h +++ b/pt_pal_editor/release/macos/pt_pal_editor-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_mouse.h @@ -198,13 +198,9 @@ extern DECLSPEC int SDLCALL SDL_WarpMouseGlobal(int x, int y); /** * Set relative mouse mode. * - * While the mouse is in relative mode, the cursor is hidden, and the driver - * will try to report continuous motion in the current window. Only relative - * motion events will be delivered, the mouse position will not change. - * - * Note that this function will not be able to provide continuous relative - * motion when used over Microsoft Remote Desktop, instead motion is limited - * to the bounds of the screen. + * While the mouse is in relative mode, the cursor is hidden, the mouse + * position is constrained to the window, and SDL will report continuous + * relative mouse motion even if the mouse is at the edge of the window. * * This function will flush any pending mouse motion. * @@ -389,6 +385,9 @@ extern DECLSPEC SDL_Cursor *SDLCALL SDL_GetCursor(void); /** * Get the default cursor. * + * You do not have to call SDL_FreeCursor() on the return value, but it is + * safe to do so. + * * \returns the default cursor on success or NULL on failure. * * \since This function is available since SDL 2.0.0. diff --git a/pt_pal_editor/release/macos/pt_pal_editor-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_mutex.h b/pt_pal_editor/release/macos/pt_pal_editor-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_mutex.h index 88d0d14..d4afb6f 100644 --- a/pt_pal_editor/release/macos/pt_pal_editor-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_mutex.h +++ b/pt_pal_editor/release/macos/pt_pal_editor-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_mutex.h @@ -31,6 +31,80 @@ #include #include +/******************************************************************************/ +/* Enable thread safety attributes only with clang. + * The attributes can be safely erased when compiling with other compilers. + */ +#if defined(SDL_THREAD_SAFETY_ANALYSIS) && \ + defined(__clang__) && (!defined(SWIG)) +#define SDL_THREAD_ANNOTATION_ATTRIBUTE__(x) __attribute__((x)) +#else +#define SDL_THREAD_ANNOTATION_ATTRIBUTE__(x) /* no-op */ +#endif + +#define SDL_CAPABILITY(x) \ + SDL_THREAD_ANNOTATION_ATTRIBUTE__(capability(x)) + +#define SDL_SCOPED_CAPABILITY \ + SDL_THREAD_ANNOTATION_ATTRIBUTE__(scoped_lockable) + +#define SDL_GUARDED_BY(x) \ + SDL_THREAD_ANNOTATION_ATTRIBUTE__(guarded_by(x)) + +#define SDL_PT_GUARDED_BY(x) \ + SDL_THREAD_ANNOTATION_ATTRIBUTE__(pt_guarded_by(x)) + +#define SDL_ACQUIRED_BEFORE(x) \ + SDL_THREAD_ANNOTATION_ATTRIBUTE__(acquired_before(x)) + +#define SDL_ACQUIRED_AFTER(x) \ + SDL_THREAD_ANNOTATION_ATTRIBUTE__(acquired_after(x)) + +#define SDL_REQUIRES(x) \ + SDL_THREAD_ANNOTATION_ATTRIBUTE__(requires_capability(x)) + +#define SDL_REQUIRES_SHARED(x) \ + SDL_THREAD_ANNOTATION_ATTRIBUTE__(requires_shared_capability(x)) + +#define SDL_ACQUIRE(x) \ + SDL_THREAD_ANNOTATION_ATTRIBUTE__(acquire_capability(x)) + +#define SDL_ACQUIRE_SHARED(x) \ + SDL_THREAD_ANNOTATION_ATTRIBUTE__(acquire_shared_capability(x)) + +#define SDL_RELEASE(x) \ + SDL_THREAD_ANNOTATION_ATTRIBUTE__(release_capability(x)) + +#define SDL_RELEASE_SHARED(x) \ + SDL_THREAD_ANNOTATION_ATTRIBUTE__(release_shared_capability(x)) + +#define SDL_RELEASE_GENERIC(x) \ + SDL_THREAD_ANNOTATION_ATTRIBUTE__(release_generic_capability(x)) + +#define SDL_TRY_ACQUIRE(x, y) \ + SDL_THREAD_ANNOTATION_ATTRIBUTE__(try_acquire_capability(x, y)) + +#define SDL_TRY_ACQUIRE_SHARED(x, y) \ + SDL_THREAD_ANNOTATION_ATTRIBUTE__(try_acquire_shared_capability(x, y)) + +#define SDL_EXCLUDES(x) \ + SDL_THREAD_ANNOTATION_ATTRIBUTE__(locks_excluded(x)) + +#define SDL_ASSERT_CAPABILITY(x) \ + SDL_THREAD_ANNOTATION_ATTRIBUTE__(assert_capability(x)) + +#define SDL_ASSERT_SHARED_CAPABILITY(x) \ + SDL_THREAD_ANNOTATION_ATTRIBUTE__(assert_shared_capability(x)) + +#define SDL_RETURN_CAPABILITY(x) \ + SDL_THREAD_ANNOTATION_ATTRIBUTE__(lock_returned(x)) + +#define SDL_NO_THREAD_SAFETY_ANALYSIS \ + SDL_THREAD_ANNOTATION_ATTRIBUTE__(no_thread_safety_analysis) + +/******************************************************************************/ + + #include /* Set up for C function definitions, even when using C++ */ #ifdef __cplusplus @@ -96,7 +170,7 @@ extern DECLSPEC SDL_mutex *SDLCALL SDL_CreateMutex(void); * * \since This function is available since SDL 2.0.0. */ -extern DECLSPEC int SDLCALL SDL_LockMutex(SDL_mutex * mutex); +extern DECLSPEC int SDLCALL SDL_LockMutex(SDL_mutex * mutex) SDL_ACQUIRE(mutex); #define SDL_mutexP(m) SDL_LockMutex(m) /** @@ -119,7 +193,7 @@ extern DECLSPEC int SDLCALL SDL_LockMutex(SDL_mutex * mutex); * \sa SDL_LockMutex * \sa SDL_UnlockMutex */ -extern DECLSPEC int SDLCALL SDL_TryLockMutex(SDL_mutex * mutex); +extern DECLSPEC int SDLCALL SDL_TryLockMutex(SDL_mutex * mutex) SDL_TRY_ACQUIRE(0, mutex); /** * Unlock the mutex. @@ -138,7 +212,7 @@ extern DECLSPEC int SDLCALL SDL_TryLockMutex(SDL_mutex * mutex); * * \since This function is available since SDL 2.0.0. */ -extern DECLSPEC int SDLCALL SDL_UnlockMutex(SDL_mutex * mutex); +extern DECLSPEC int SDLCALL SDL_UnlockMutex(SDL_mutex * mutex) SDL_RELEASE(mutex); #define SDL_mutexV(m) SDL_UnlockMutex(m) /** @@ -276,7 +350,7 @@ extern DECLSPEC int SDLCALL SDL_SemTryWait(SDL_sem * sem); * successful it will atomically decrement the semaphore value. * * \param sem the semaphore to wait on - * \param ms the length of the timeout, in milliseconds + * \param timeout the length of the timeout, in milliseconds * \returns 0 if the wait succeeds, `SDL_MUTEX_TIMEDOUT` if the wait does not * succeed in the allotted time, or a negative error code on failure; * call SDL_GetError() for more information. @@ -290,7 +364,7 @@ extern DECLSPEC int SDLCALL SDL_SemTryWait(SDL_sem * sem); * \sa SDL_SemValue * \sa SDL_SemWait */ -extern DECLSPEC int SDLCALL SDL_SemWaitTimeout(SDL_sem * sem, Uint32 ms); +extern DECLSPEC int SDLCALL SDL_SemWaitTimeout(SDL_sem *sem, Uint32 timeout); /** * Atomically increment a semaphore's value and wake waiting threads. diff --git a/pt_pal_editor/release/macos/pt_pal_editor-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_opengl_glext.h b/pt_pal_editor/release/macos/pt_pal_editor-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_opengl_glext.h index 8527e17..ff6ad12 100644 --- a/pt_pal_editor/release/macos/pt_pal_editor-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_opengl_glext.h +++ b/pt_pal_editor/release/macos/pt_pal_editor-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_opengl_glext.h @@ -1,4 +1,8 @@ -#ifndef __gl_glext_h_ +/* SDL modified the include guard to be compatible with Mesa and Apple include guards: + * - Mesa uses: __gl_glext_h_ + * - Apple uses: __glext_h_ */ +#if !defined(__glext_h_) && !defined(__gl_glext_h_) +#define __glext_h_ 1 #define __gl_glext_h_ 1 #ifdef __cplusplus diff --git a/pt_pal_editor/release/macos/pt_pal_editor-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_power.h b/pt_pal_editor/release/macos/pt_pal_editor-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_power.h index 5e4b705..0d5bb9c 100644 --- a/pt_pal_editor/release/macos/pt_pal_editor-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_power.h +++ b/pt_pal_editor/release/macos/pt_pal_editor-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_power.h @@ -48,7 +48,6 @@ typedef enum SDL_POWERSTATE_CHARGED /**< Plugged in, battery charged */ } SDL_PowerState; - /** * Get the current power supply details. * @@ -65,17 +64,17 @@ typedef enum * It's possible a platform can only report battery percentage or time left * but not both. * - * \param secs seconds of battery life left, you can pass a NULL here if you - * don't care, will return -1 if we can't determine a value, or - * we're not running on a battery - * \param pct percentage of battery life left, between 0 and 100, you can pass - * a NULL here if you don't care, will return -1 if we can't - * determine a value, or we're not running on a battery + * \param seconds seconds of battery life left, you can pass a NULL here if + * you don't care, will return -1 if we can't determine a + * value, or we're not running on a battery + * \param percent percentage of battery life left, between 0 and 100, you can + * pass a NULL here if you don't care, will return -1 if we + * can't determine a value, or we're not running on a battery * \returns an SDL_PowerState enum representing the current battery state. * * \since This function is available since SDL 2.0.0. */ -extern DECLSPEC SDL_PowerState SDLCALL SDL_GetPowerInfo(int *secs, int *pct); +extern DECLSPEC SDL_PowerState SDLCALL SDL_GetPowerInfo(int *seconds, int *percent); /* Ends C function definitions when using C++ */ #ifdef __cplusplus diff --git a/pt_pal_editor/release/macos/pt_pal_editor-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_render.h b/pt_pal_editor/release/macos/pt_pal_editor-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_render.h index b1ca75d..1a9166a 100644 --- a/pt_pal_editor/release/macos/pt_pal_editor-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_render.h +++ b/pt_pal_editor/release/macos/pt_pal_editor-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_render.h @@ -1731,6 +1731,11 @@ extern DECLSPEC int SDLCALL SDL_RenderReadPixels(SDL_Renderer * renderer, * * \param renderer the rendering context * + * \threadsafety You may only call this function on the main thread. If this + * happens to work on a background thread on any given platform + * or backend, it's purely by luck and you should not rely on it + * to work next time. + * * \since This function is available since SDL 2.0.0. * * \sa SDL_RenderClear diff --git a/pt_pal_editor/release/macos/pt_pal_editor-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_revision.h b/pt_pal_editor/release/macos/pt_pal_editor-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_revision.h index ffb5c6b..dd26edf 100644 --- a/pt_pal_editor/release/macos/pt_pal_editor-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_revision.h +++ b/pt_pal_editor/release/macos/pt_pal_editor-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_revision.h @@ -1,7 +1,7 @@ /* Generated by updaterev.sh, do not edit */ #ifdef SDL_VENDOR_INFO -#define SDL_REVISION "SDL-release-2.26.5-0-gac13ca9ab (" SDL_VENDOR_INFO ")" +#define SDL_REVISION "SDL-release-2.28.0-0-gffa78e6be (" SDL_VENDOR_INFO ")" #else -#define SDL_REVISION "SDL-release-2.26.5-0-gac13ca9ab" +#define SDL_REVISION "SDL-release-2.28.0-0-gffa78e6be" #endif #define SDL_REVISION_NUMBER 0 diff --git a/pt_pal_editor/release/macos/pt_pal_editor-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_sensor.h b/pt_pal_editor/release/macos/pt_pal_editor-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_sensor.h index 12fb061..85129ba 100644 --- a/pt_pal_editor/release/macos/pt_pal_editor-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_sensor.h +++ b/pt_pal_editor/release/macos/pt_pal_editor-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_sensor.h @@ -84,7 +84,7 @@ typedef enum * The accelerometer returns the current acceleration in SI meters per * second squared. This measurement includes the force of gravity, so * a device at rest will have an value of SDL_STANDARD_GRAVITY away - * from the center of the earth. + * from the center of the earth, which is a positive Y value. * * values[0]: Acceleration on the x axis * values[1]: Acceleration on the y axis diff --git a/pt_pal_editor/release/macos/pt_pal_editor-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_stdinc.h b/pt_pal_editor/release/macos/pt_pal_editor-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_stdinc.h index d40effa..f4f7fcc 100644 --- a/pt_pal_editor/release/macos/pt_pal_editor-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_stdinc.h +++ b/pt_pal_editor/release/macos/pt_pal_editor-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_stdinc.h @@ -30,12 +30,6 @@ #include -#ifdef __APPLE__ -#ifndef _DARWIN_C_SOURCE -#define _DARWIN_C_SOURCE 1 /* for memset_pattern4() */ -#endif -#endif - #ifdef HAVE_SYS_TYPES_H #include #endif @@ -85,7 +79,9 @@ Visual Studio. See http://msdn.microsoft.com/en-us/library/4hwaceh6.aspx for more information. */ -# define _USE_MATH_DEFINES +# ifndef _USE_MATH_DEFINES +# define _USE_MATH_DEFINES +# endif # endif # include #endif @@ -528,9 +524,7 @@ extern DECLSPEC void *SDLCALL SDL_memset(SDL_OUT_BYTECAP(len) void *dst, int c, /* Note that memset() is a byte assignment and this is a 32-bit assignment, so they're not directly equivalent. */ SDL_FORCE_INLINE void SDL_memset4(void *dst, Uint32 val, size_t dwords) { -#ifdef __APPLE__ - memset_pattern4(dst, &val, dwords * 4); -#elif defined(__GNUC__) && defined(__i386__) +#if defined(__GNUC__) && defined(__i386__) int u0, u1, u2; __asm__ __volatile__ ( "cld \n\t" @@ -694,7 +688,7 @@ extern DECLSPEC size_t SDLCALL SDL_iconv(SDL_iconv_t cd, const char **inbuf, size_t * outbytesleft); /** - * This function converts a string between encodings in one pass, returning a + * This function converts a buffer or string between encodings in one pass, returning a * string that must be freed with SDL_free() or NULL on error. * * \since This function is available since SDL 2.0.0. @@ -722,6 +716,20 @@ size_t strlcpy(char* dst, const char* src, size_t size); size_t strlcat(char* dst, const char* src, size_t size); #endif +#ifndef HAVE_WCSLCPY +size_t wcslcpy(wchar_t *dst, const wchar_t *src, size_t size); +#endif + +#ifndef HAVE_WCSLCAT +size_t wcslcat(wchar_t *dst, const wchar_t *src, size_t size); +#endif + +/* Starting LLVM 16, the analyser errors out if these functions do not have + their prototype defined (clang-diagnostic-implicit-function-declaration) */ +#include +#include +#include + #define SDL_malloc malloc #define SDL_calloc calloc #define SDL_realloc realloc diff --git a/pt_pal_editor/release/macos/pt_pal_editor-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_thread.h b/pt_pal_editor/release/macos/pt_pal_editor-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_thread.h index 0b19651..fad1afb 100644 --- a/pt_pal_editor/release/macos/pt_pal_editor-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_thread.h +++ b/pt_pal_editor/release/macos/pt_pal_editor-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_thread.h @@ -35,7 +35,7 @@ #include #include -#if defined(__WIN32__) || defined(__GDK__) +#if (defined(__WIN32__) || defined(__GDK__)) && !defined(__WINRT__) #include /* _beginthreadex() and _endthreadex() */ #endif #if defined(__OS2__) /* for _beginthread() and _endthread() */ @@ -88,7 +88,7 @@ typedef enum { typedef int (SDLCALL * SDL_ThreadFunction) (void *data); -#if defined(__WIN32__) || defined(__GDK__) +#if (defined(__WIN32__) || defined(__GDK__)) && !defined(__WINRT__) /** * \file SDL_thread.h * diff --git a/pt_pal_editor/release/macos/pt_pal_editor-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_version.h b/pt_pal_editor/release/macos/pt_pal_editor-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_version.h index 0fca7db..eedaf9d 100644 --- a/pt_pal_editor/release/macos/pt_pal_editor-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_version.h +++ b/pt_pal_editor/release/macos/pt_pal_editor-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_version.h @@ -58,8 +58,8 @@ typedef struct SDL_version /* Printable format: "%d.%d.%d", MAJOR, MINOR, PATCHLEVEL */ #define SDL_MAJOR_VERSION 2 -#define SDL_MINOR_VERSION 26 -#define SDL_PATCHLEVEL 5 +#define SDL_MINOR_VERSION 28 +#define SDL_PATCHLEVEL 0 /** * Macro to determine SDL version program was compiled against. diff --git a/pt_pal_editor/release/macos/pt_pal_editor-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_video.h b/pt_pal_editor/release/macos/pt_pal_editor-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_video.h index 48504c0..d1da813 100644 --- a/pt_pal_editor/release/macos/pt_pal_editor-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_video.h +++ b/pt_pal_editor/release/macos/pt_pal_editor-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_video.h @@ -187,7 +187,8 @@ typedef enum SDL_DISPLAYEVENT_NONE, /**< Never used */ SDL_DISPLAYEVENT_ORIENTATION, /**< Display orientation has changed to data1 */ SDL_DISPLAYEVENT_CONNECTED, /**< Display has been added to the system */ - SDL_DISPLAYEVENT_DISCONNECTED /**< Display has been removed from the system */ + SDL_DISPLAYEVENT_DISCONNECTED, /**< Display has been removed from the system */ + SDL_DISPLAYEVENT_MOVED /**< Display has changed position */ } SDL_DisplayEventID; /** @@ -1274,6 +1275,17 @@ extern DECLSPEC void SDLCALL SDL_RestoreWindow(SDL_Window * window); extern DECLSPEC int SDLCALL SDL_SetWindowFullscreen(SDL_Window * window, Uint32 flags); +/** + * Return whether the window has a surface associated with it. + * + * \returns SDL_TRUE if there is a surface associated with the window, or SDL_FALSE otherwise. + * + * \since This function is available since SDL 2.28.0. + * + * \sa SDL_GetWindowSurface + */ +extern DECLSPEC SDL_bool SDLCALL SDL_HasWindowSurface(SDL_Window *window); + /** * Get the SDL surface associated with the window. * @@ -1294,6 +1306,8 @@ extern DECLSPEC int SDLCALL SDL_SetWindowFullscreen(SDL_Window * window, * * \since This function is available since SDL 2.0.0. * + * \sa SDL_DestroyWindowSurface + * \sa SDL_HasWindowSurface * \sa SDL_UpdateWindowSurface * \sa SDL_UpdateWindowSurfaceRects */ @@ -1328,7 +1342,7 @@ extern DECLSPEC int SDLCALL SDL_UpdateWindowSurface(SDL_Window * window); * * \param window the window to update * \param rects an array of SDL_Rect structures representing areas of the - * surface to copy + * surface to copy, in pixels * \param numrects the number of rectangles * \returns 0 on success or a negative error code on failure; call * SDL_GetError() for more information. @@ -1342,6 +1356,20 @@ extern DECLSPEC int SDLCALL SDL_UpdateWindowSurfaceRects(SDL_Window * window, const SDL_Rect * rects, int numrects); +/** + * Destroy the surface associated with the window. + * + * \param window the window to update + * \returns 0 on success or a negative error code on failure; call + * SDL_GetError() for more information. + * + * \since This function is available since SDL 2.28.0. + * + * \sa SDL_GetWindowSurface + * \sa SDL_HasWindowSurface + */ +extern DECLSPEC int SDLCALL SDL_DestroyWindowSurface(SDL_Window *window); + /** * Set a window's input grab mode. * diff --git a/pt_pal_editor/release/macos/pt_pal_editor-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/begin_code.h b/pt_pal_editor/release/macos/pt_pal_editor-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/begin_code.h index 1f01e0b..4142ffe 100644 --- a/pt_pal_editor/release/macos/pt_pal_editor-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/begin_code.h +++ b/pt_pal_editor/release/macos/pt_pal_editor-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/begin_code.h @@ -28,10 +28,10 @@ */ /* This shouldn't be nested -- included it around code only. */ -#ifdef _begin_code_h +#ifdef SDL_begin_code_h #error Nested inclusion of begin_code.h #endif -#define _begin_code_h +#define SDL_begin_code_h #ifndef SDL_DEPRECATED # if defined(__GNUC__) && (__GNUC__ >= 4) /* technically, this arrived in gcc 3.1, but oh well. */ @@ -171,17 +171,17 @@ #define SDL_FALLTHROUGH [[fallthrough]] #else #if defined(__has_attribute) -#define _HAS_FALLTHROUGH __has_attribute(__fallthrough__) +#define SDL_HAS_FALLTHROUGH __has_attribute(__fallthrough__) #else -#define _HAS_FALLTHROUGH 0 +#define SDL_HAS_FALLTHROUGH 0 #endif /* __has_attribute */ -#if _HAS_FALLTHROUGH && \ +#if SDL_HAS_FALLTHROUGH && \ ((defined(__GNUC__) && __GNUC__ >= 7) || \ (defined(__clang_major__) && __clang_major__ >= 10)) #define SDL_FALLTHROUGH __attribute__((__fallthrough__)) #else #define SDL_FALLTHROUGH do {} while (0) /* fallthrough */ -#endif /* _HAS_FALLTHROUGH */ -#undef _HAS_FALLTHROUGH +#endif /* SDL_HAS_FALLTHROUGH */ +#undef SDL_HAS_FALLTHROUGH #endif /* C++17 or C2x */ #endif /* SDL_FALLTHROUGH not defined */ diff --git a/pt_pal_editor/release/macos/pt_pal_editor-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/close_code.h b/pt_pal_editor/release/macos/pt_pal_editor-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/close_code.h index 874a926..b5ff3e2 100644 --- a/pt_pal_editor/release/macos/pt_pal_editor-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/close_code.h +++ b/pt_pal_editor/release/macos/pt_pal_editor-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/close_code.h @@ -26,10 +26,10 @@ * after you finish any function and structure declarations in your headers */ -#ifndef _begin_code_h +#ifndef SDL_begin_code_h #error close_code.h included without matching begin_code.h #endif -#undef _begin_code_h +#undef SDL_begin_code_h /* Reset structure packing at previous byte alignment */ #if defined(_MSC_VER) || defined(__MWERKS__) || defined(__BORLANDC__) diff --git a/pt_pal_editor/release/macos/pt_pal_editor-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Resources/CMake/sdl2-config.cmake b/pt_pal_editor/release/macos/pt_pal_editor-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Resources/CMake/sdl2-config.cmake index 28c34bc..e1b7713 100644 --- a/pt_pal_editor/release/macos/pt_pal_editor-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Resources/CMake/sdl2-config.cmake +++ b/pt_pal_editor/release/macos/pt_pal_editor-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Resources/CMake/sdl2-config.cmake @@ -57,6 +57,8 @@ if(NOT TARGET SDL2::SDL2) INTERFACE_LINK_OPTIONS "SHELL:-F \"${SDL2_FRAMEWORK_PARENT_PATH}\";SHELL:-framework SDL2" COMPATIBLE_INTERFACE_BOOL "SDL2_SHARED" INTERFACE_SDL2_SHARED "ON" + COMPATIBLE_INTERFACE_STRING "SDL_VERSION" + INTERFACE_SDL_VERSION "SDL2" ) endif() set(SDL2_SDL2_FOUND TRUE) diff --git a/pt_pal_editor/release/macos/pt_pal_editor-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Resources/Info.plist b/pt_pal_editor/release/macos/pt_pal_editor-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Resources/Info.plist index 01563ad..6cce908 100644 --- a/pt_pal_editor/release/macos/pt_pal_editor-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Resources/Info.plist +++ b/pt_pal_editor/release/macos/pt_pal_editor-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Resources/Info.plist @@ -3,7 +3,7 @@ BuildMachineOSBuild - 22D68 + 22F66 CFBundleDevelopmentRegion English CFBundleExecutable @@ -19,7 +19,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 2.26.5 + 2.28.0 CFBundleSignature SDLX CFBundleSupportedPlatforms @@ -27,7 +27,7 @@ MacOSX CFBundleVersion - 2.26.5 + 2.28.0 DTCompiler com.apple.compilers.llvm.clang.1_0 DTPlatformBuild @@ -41,9 +41,9 @@ DTSDKName macosx13.3 DTXcode - 1430 + 1431 DTXcodeBuild - 14E222b + 14E300c LSMinimumSystemVersion 10.11 diff --git a/pt_pal_editor/release/macos/pt_pal_editor-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/SDL2 b/pt_pal_editor/release/macos/pt_pal_editor-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/SDL2 index 8364974..46b7233 100644 Binary files a/pt_pal_editor/release/macos/pt_pal_editor-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/SDL2 and b/pt_pal_editor/release/macos/pt_pal_editor-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/SDL2 differ diff --git a/pt_pal_editor/release/macos/pt_pal_editor-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/_CodeSignature/CodeResources b/pt_pal_editor/release/macos/pt_pal_editor-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/_CodeSignature/CodeResources index 465c162..6d8949e 100644 --- a/pt_pal_editor/release/macos/pt_pal_editor-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/_CodeSignature/CodeResources +++ b/pt_pal_editor/release/macos/pt_pal_editor-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/_CodeSignature/CodeResources @@ -10,11 +10,11 @@ Resources/CMake/sdl2-config.cmake - aottfZnkkRrcejRrYqK2L/49GIU= + s2hXhDxzy/ilC+gLamGy/Kq13jo= Resources/Info.plist - ECcyTBfZPucOFnTMf7BSonyduBg= + MP8SsWNX9fsyVRo11YwxKezmPug= Resources/License.txt @@ -57,22 +57,22 @@ hash - TaFJjJYsOXON8iaLEX5xgfJH0FI= + FTCyRgMQ1IzdGYV2XbCDSQ7JNec= hash2 - nmWpPus/eISidEuuFqvVp/7XY07q4kHIRaT63X/reVA= + 4iFngSAorzMM520V+2V1sriu9mL12sLlPrhNfgT12Ck= Headers/SDL_audio.h hash - 16xbool8mbuYWNC2lmIqMxUmlZQ= + ATRDpv42XjNUWqjKPDAPYqIqvDY= hash2 - fqqrBPvDux0Z4lIvqQKdhOVSZRLcTBx0Qva8cbLp418= + MThYj7HEVNC7MdUTbzgyHDqlDMDS9g664b6M5d7tsdY= Headers/SDL_bits.h @@ -90,11 +90,11 @@ hash - zzSdvjZ9hKJxyC3VzOOwKmq61/U= + ThQw2vcWPo/mLtvKmhQrjhSQhLk= hash2 - BD+r9teOyEpTHM6NwvtQPhrazAj5e2wzwqQ/EqWKgVg= + o3UtzbWJqnTeh6+r+oLVdOzcJZ1b3XhfPINDjKHftu4= Headers/SDL_clipboard.h @@ -156,11 +156,11 @@ hash - MHpy1KvnqOf64f2781BUtUz0DEI= + j6/tuHiJfdv8YaI9k3fogDw4bNc= hash2 - AmEG80oborsu7cRbeBBS2zyDKvyxTT2kh0M7rYrm2HI= + P5KOVzR2wBlhdSw7biIJ3O78dnYnoGdi4pHxvyFcLdY= Headers/SDL_error.h @@ -200,11 +200,11 @@ hash - RMJ7KpEMN4aYVe8PvF0XyjhXVOc= + DGpJeIYXN/t/Yyqilband2kKOSk= hash2 - dJDgv9TNy/SgR2cADGxsSrwu1NZX2fYO830svryW4uc= + hgAaf8SQwVfc94yXKjNFA3VpsTCYwL65W5X6lXEnsgI= Headers/SDL_gesture.h @@ -255,22 +255,22 @@ hash - j33d96aUBrEwCVm9GpDBW1CXvVo= + M/nqf8jyrXJ9IrgLrVffOZG4Jlo= hash2 - WiHkNUFgiALKRxAIDQuaaU+Y6gKgtqw8YmZHPMtPyK4= + nCUBVEvtWTQ2Ab/H1a9n4I68tT572DhjMnne+N52bwY= Headers/SDL_joystick.h hash - 85/bNiER9h5QVoRQLNEZGF5VD3E= + Y/dkiMb7+9Wmo8oyyOuh4igQK4o= hash2 - l5rSDksaaBXPl3GCffxGblOMgjvcufJSuuCglByf2yM= + d3rYIj9RV45IuiYZAbOQyNe3iR4DORkkqwYiSA81c6k= Headers/SDL_keyboard.h @@ -288,11 +288,11 @@ hash - h18H9W8J7wesaRF2OApJEb2RFrY= + j4z7vftDr05ahrBr5bZnBxZ3Ufs= hash2 - zv9BVIERwcpba8USfGXPAzRO/qMWBbB5bWLDqEwWSYU= + abAEws/ibkdlWSE/bP/uq0oIjcebU59aul5g4Lu0pbA= Headers/SDL_loadso.h @@ -332,11 +332,11 @@ hash - kDbuJzb/pBtb1iutYnW/hASbKgw= + j0/bBvlkrYcnXeoB6sWoCQiIlV0= hash2 - oIwpcrlXtl8XSnVMj+EmGESlisYv8O//EaDdoAd2xm0= + QOjL/8v8HMC/N+1jocNxIGBB5pifTDWxbwOvD7wJtRg= Headers/SDL_messagebox.h @@ -376,22 +376,22 @@ hash - wWyr5YJRLgkouejijZizd1f54ZE= + AL6jjX5llLXh3nscuX0MJQQJ7C0= hash2 - TN4Ft0Tl8FBtChEmqaC9q+ihzrGRO2+oE6f4FPqM754= + 8R3uVCCs2wF9vtwJEqAi+xjYtAtJ1F6UIqCPUhiBwxU= Headers/SDL_mutex.h hash - LOlLQylQ4fAuTL6ywn5mc7YHggg= + c4s6haEURwhr1L/ZsIoQHgDC1Rw= hash2 - Xe+WvrizruQy0+uhYKV3UHknz8I5FnrW8AnSAwZJOfw= + L1kG6r9N1C+njGEvU0sAJeAVFwr6gkCCwGcBxsjDuNU= Headers/SDL_name.h @@ -420,11 +420,11 @@ hash - z3QoX44hLSqeS5sCphMCc8TAxno= + eOvalGUielSzNuOWWDLYkwqpYrg= hash2 - B2j/0LKCjlQl51aWvbslDd3Qc3C2JhJHMPu6C+u3CSs= + GrsoiRybBmG2/zdJ3iZx2l/hK+tbyxgzsta99ciezfg= Headers/SDL_opengles.h @@ -519,11 +519,11 @@ hash - smMe7j3MNIT7wXXFRtMvGPFulso= + SmO5g1nUZ1IAgDQGIlzbR8F5udg= hash2 - mwBQ8l0GVg+f+/FeIU3sMgo9JAY7X3uq4NPwOc27IL8= + Lmp/XdN6xQbqR/eAmoKFcpqk+MM65gGxjv1cLYUqG8c= Headers/SDL_quit.h @@ -552,22 +552,22 @@ hash - wLdzEIMoOvdQScGrBT0EjqjYTso= + sNcVNpmlpcvsqJmBOwyg6hjTWQ8= hash2 - xu0LmkwhR+b10K+nmKQ5XVpWOfKEHEEVTq0Ryswak3c= + 1EY74HfczRb8zZ3CZfcoinmI8nVMwFaoIfcvG7kPBEE= Headers/SDL_revision.h hash - XNd3ECdYFSFaaMv/uj3NwyatWcY= + sRLTPAglYSZ19Pdm+afA2j47taM= hash2 - FzAYjxrloDaswbapi8PCqNyMRjro8m4e4gSgAHWrJ8o= + Fo7p72CdM/uZzX9nxLeCot/MrKYwSKmo0ESISIMTIOI= Headers/SDL_rwops.h @@ -596,11 +596,11 @@ hash - Pf6/Yj0hIgsUlhqj4UGylm+TjQs= + J+9woN1Qec074rah/rly1BHM5sY= hash2 - 5fAvXcuJcCx8/Et36VSkGacoiTENdiTe2BanIplHa2Y= + sEfbN4S8Lpxm0XDblgOvnVV0fsgx/zo/q0s5h9OvhmE= Headers/SDL_shape.h @@ -618,11 +618,11 @@ hash - 5MtebnJHZfnCFhT9MeT6pg3EoPI= + iliyExriwpoxEAgG8CI8CG8go54= hash2 - qf4ijhTzMO4g9aKUrU+z10KfGRbOKVg3jIUS7TKrovA= + I4aI+ExJq+16kZfDjF++Uaa2lHZjUWmuFc83IUDfuIk= Headers/SDL_surface.h @@ -662,11 +662,11 @@ hash - bCVCxCLiY7Rkx02GC2u37KSejsU= + rdWafQMEiS2pSqeEGdRXDjaU96Q= hash2 - Qhsj5cNniFikrpQc/wnB/IipdeR8tFkywQAEwSyernM= + pVkN+av2tjneOX9IafFyXjDRaWe/ROSrLwUQRfCrYYA= Headers/SDL_timer.h @@ -706,22 +706,22 @@ hash - QDqwH27Tmjz8nMPphdVAZqPqGt0= + BrMh/0kZeBHu8Xr+/5hS8IHcMfU= hash2 - nk6h9XDXojUkw/F8Ff7er08rfzKTzlMT0jLr2lPMgv8= + tIqaCIDNMsT9rQ9arELIo8WVF04pSMBtxaavylyyrK4= Headers/SDL_video.h hash - YAMYz1pUQobEWpC1EuOB5YmsIZc= + oDSfm7hvyakVAn3MJ/vPYpDiTi8= hash2 - bFi0k6PF8xpOpR6X0Wsidxl7LIWX2hVGjSysd6roB6A= + 4kgMp+1L702uCbe5U3mPNYx/zonCSDmAoqKxZGMWlC0= Headers/SDL_vulkan.h @@ -739,22 +739,22 @@ hash - f6TnCZT882PpPk816tLLYBb5tJM= + BXr58UQDjOvu3YEpLqbL6MzdnEw= hash2 - G4bzpDXzXe091TEGmuQxF+N64ZDTNg32tUjyDAYJXmE= + lZjnBGKuQiSupwtm3kZTliIMMPlHVmUsVTRtQ7E0WMU= Headers/close_code.h hash - pzX1cw2hHQdMFCO0VcO1VVsfXUo= + b9BWGnHVTllZJNggBlv8S0bczLA= hash2 - +ybA2nqIwfLyUQ9Pf9ZLXUyXMGNS3xZMEowuIcqIrRQ= + /x8Gxc1GaIoziXOz/sebI7d0PytDiEWi8kWZfjkp0Ww= Resources/CMake/sdl2-config-version.cmake @@ -772,22 +772,22 @@ hash - aottfZnkkRrcejRrYqK2L/49GIU= + s2hXhDxzy/ilC+gLamGy/Kq13jo= hash2 - NtAgweQRe487Cy32/RioObq+KAq6SXdUsRtQZaAvT6U= + DuTUW8idzRp7WT1FT5x/m1C1SbVH0FKvKRKOgVlRVhU= Resources/Info.plist hash - ECcyTBfZPucOFnTMf7BSonyduBg= + MP8SsWNX9fsyVRo11YwxKezmPug= hash2 - 4i5aYnvsU/2ssKdrpU5A9mYIX4q4fzaqinS7xOcPTyY= + JS+9bRfZuLgojqjIgCYRqSXUyJ5L/MJO+Cyss5R17Rs= Resources/License.txt diff --git a/pt_pal_editor/release/win32/SDL2.dll b/pt_pal_editor/release/win32/SDL2.dll index 6959783..64789ee 100644 Binary files a/pt_pal_editor/release/win32/SDL2.dll and b/pt_pal_editor/release/win32/SDL2.dll differ diff --git a/pt_pal_editor/release/win64/SDL2.dll b/pt_pal_editor/release/win64/SDL2.dll index d0050c9..d48b854 100644 Binary files a/pt_pal_editor/release/win64/SDL2.dll and b/pt_pal_editor/release/win64/SDL2.dll differ diff --git a/pt_pal_editor/vs2019_project/pt_pal_editor/SDL2.dll b/pt_pal_editor/vs2019_project/pt_pal_editor/SDL2.dll index bcbbaba..64789ee 100644 Binary files a/pt_pal_editor/vs2019_project/pt_pal_editor/SDL2.dll and b/pt_pal_editor/vs2019_project/pt_pal_editor/SDL2.dll differ diff --git a/pt_pal_editor/vs2019_project/x64/Debug/SDL2.dll b/pt_pal_editor/vs2019_project/x64/Debug/SDL2.dll index 21c8cef..d48b854 100644 Binary files a/pt_pal_editor/vs2019_project/x64/Debug/SDL2.dll and b/pt_pal_editor/vs2019_project/x64/Debug/SDL2.dll differ diff --git a/release/macos/pt2-clone-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_atomic.h b/release/macos/pt2-clone-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_atomic.h index af40c0e..56dab7e 100644 --- a/release/macos/pt2-clone-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_atomic.h +++ b/release/macos/pt2-clone-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_atomic.h @@ -249,9 +249,8 @@ typedef void (*SDL_KernelMemoryBarrierFunc)(); #elif defined(_MSC_VER) && (defined(_M_ARM) || defined(_M_ARM64)) #define SDL_CPUPauseInstruction() __yield() #elif defined(__WATCOMC__) && defined(__386__) - /* watcom assembler rejects PAUSE if CPU < i686, and it refuses REP NOP as an invalid combination. Hardcode the bytes. */ extern __inline void SDL_CPUPauseInstruction(void); - #pragma aux SDL_CPUPauseInstruction = "db 0f3h,90h" + #pragma aux SDL_CPUPauseInstruction = ".686p" ".xmm2" "pause" #else #define SDL_CPUPauseInstruction() #endif diff --git a/release/macos/pt2-clone-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_audio.h b/release/macos/pt2-clone-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_audio.h index 98a833c..2eeb542 100644 --- a/release/macos/pt2-clone-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_audio.h +++ b/release/macos/pt2-clone-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_audio.h @@ -169,13 +169,13 @@ typedef void (SDLCALL * SDL_AudioCallback) (void *userdata, Uint8 * stream, * The calculated values in this structure are calculated by SDL_OpenAudio(). * * For multi-channel audio, the default SDL channel mapping is: - * 2: FL FR (stereo) - * 3: FL FR LFE (2.1 surround) - * 4: FL FR BL BR (quad) - * 5: FL FR LFE BL BR (4.1 surround) - * 6: FL FR FC LFE SL SR (5.1 surround - last two can also be BL BR) - * 7: FL FR FC LFE BC SL SR (6.1 surround) - * 8: FL FR FC LFE BL BR SL SR (7.1 surround) + * 2: FL FR (stereo) + * 3: FL FR LFE (2.1 surround) + * 4: FL FR BL BR (quad) + * 5: FL FR LFE BL BR (4.1 surround) + * 6: FL FR FC LFE SL SR (5.1 surround - last two can also be BL BR) + * 7: FL FR FC LFE BC SL SR (6.1 surround) + * 8: FL FR FC LFE BL BR SL SR (7.1 surround) */ typedef struct SDL_AudioSpec { diff --git a/release/macos/pt2-clone-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_blendmode.h b/release/macos/pt2-clone-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_blendmode.h index 67e37d6..cdd84e7 100644 --- a/release/macos/pt2-clone-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_blendmode.h +++ b/release/macos/pt2-clone-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_blendmode.h @@ -52,7 +52,7 @@ typedef enum dstA = dstA */ SDL_BLENDMODE_MUL = 0x00000008, /**< color multiply dstRGB = (srcRGB * dstRGB) + (dstRGB * (1-srcA)) - dstA = (srcA * dstA) + (dstA * (1-srcA)) */ + dstA = dstA */ SDL_BLENDMODE_INVALID = 0x7FFFFFFF /* Additional custom blend modes can be returned by SDL_ComposeCustomBlendMode() */ diff --git a/release/macos/pt2-clone-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_endian.h b/release/macos/pt2-clone-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_endian.h index 219ba8a..62f7ae4 100644 --- a/release/macos/pt2-clone-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_endian.h +++ b/release/macos/pt2-clone-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_endian.h @@ -140,7 +140,7 @@ extern "C" { #if HAS_BUILTIN_BSWAP16 #define SDL_Swap16(x) __builtin_bswap16(x) -#elif defined(_MSC_VER) && (_MSC_VER >= 1400) +#elif (defined(_MSC_VER) && (_MSC_VER >= 1400)) && !defined(__ICL) #pragma intrinsic(_byteswap_ushort) #define SDL_Swap16(x) _byteswap_ushort(x) #elif defined(__i386__) && !HAS_BROKEN_BSWAP @@ -189,7 +189,7 @@ SDL_Swap16(Uint16 x) #if HAS_BUILTIN_BSWAP32 #define SDL_Swap32(x) __builtin_bswap32(x) -#elif defined(_MSC_VER) && (_MSC_VER >= 1400) +#elif (defined(_MSC_VER) && (_MSC_VER >= 1400)) && !defined(__ICL) #pragma intrinsic(_byteswap_ulong) #define SDL_Swap32(x) _byteswap_ulong(x) #elif defined(__i386__) && !HAS_BROKEN_BSWAP @@ -241,7 +241,7 @@ SDL_Swap32(Uint32 x) #if HAS_BUILTIN_BSWAP64 #define SDL_Swap64(x) __builtin_bswap64(x) -#elif defined(_MSC_VER) && (_MSC_VER >= 1400) +#elif (defined(_MSC_VER) && (_MSC_VER >= 1400)) && !defined(__ICL) #pragma intrinsic(_byteswap_uint64) #define SDL_Swap64(x) _byteswap_uint64(x) #elif defined(__i386__) && !HAS_BROKEN_BSWAP diff --git a/release/macos/pt2-clone-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_gamecontroller.h b/release/macos/pt2-clone-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_gamecontroller.h index 3afca9b..266e706 100644 --- a/release/macos/pt2-clone-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_gamecontroller.h +++ b/release/macos/pt2-clone-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_gamecontroller.h @@ -724,10 +724,10 @@ typedef enum SDL_CONTROLLER_BUTTON_DPAD_LEFT, SDL_CONTROLLER_BUTTON_DPAD_RIGHT, SDL_CONTROLLER_BUTTON_MISC1, /* Xbox Series X share button, PS5 microphone button, Nintendo Switch Pro capture button, Amazon Luna microphone button */ - SDL_CONTROLLER_BUTTON_PADDLE1, /* Xbox Elite paddle P1 */ - SDL_CONTROLLER_BUTTON_PADDLE2, /* Xbox Elite paddle P3 */ - SDL_CONTROLLER_BUTTON_PADDLE3, /* Xbox Elite paddle P2 */ - SDL_CONTROLLER_BUTTON_PADDLE4, /* Xbox Elite paddle P4 */ + SDL_CONTROLLER_BUTTON_PADDLE1, /* Xbox Elite paddle P1 (upper left, facing the back) */ + SDL_CONTROLLER_BUTTON_PADDLE2, /* Xbox Elite paddle P3 (upper right, facing the back) */ + SDL_CONTROLLER_BUTTON_PADDLE3, /* Xbox Elite paddle P2 (lower left, facing the back) */ + SDL_CONTROLLER_BUTTON_PADDLE4, /* Xbox Elite paddle P4 (lower right, facing the back) */ SDL_CONTROLLER_BUTTON_TOUCHPAD, /* PS4/PS5 touchpad button */ SDL_CONTROLLER_BUTTON_MAX } SDL_GameControllerButton; diff --git a/release/macos/pt2-clone-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_hints.h b/release/macos/pt2-clone-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_hints.h index 4b679c1..ba965e3 100644 --- a/release/macos/pt2-clone-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_hints.h +++ b/release/macos/pt2-clone-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_hints.h @@ -92,7 +92,7 @@ extern "C" { * By default this hint is not set and the APK expansion files are not searched. */ #define SDL_HINT_ANDROID_APK_EXPANSION_MAIN_FILE_VERSION "SDL_ANDROID_APK_EXPANSION_MAIN_FILE_VERSION" - + /** * \brief Android APK expansion patch file version. Should be a string number like "1", "2" etc. * @@ -132,13 +132,13 @@ extern "C" { * \brief A variable to control whether we trap the Android back button to handle it manually. * This is necessary for the right mouse button to work on some Android devices, or * to be able to trap the back button for use in your code reliably. If set to true, - * the back button will show up as an SDL_KEYDOWN / SDL_KEYUP pair with a keycode of + * the back button will show up as an SDL_KEYDOWN / SDL_KEYUP pair with a keycode of * SDL_SCANCODE_AC_BACK. * * The variable can be set to the following values: * "0" - Back button will be handled as usual for system. (default) * "1" - Back button will be trapped, allowing you to handle the key press - * manually. (This will also let right mouse click work on systems + * manually. (This will also let right mouse click work on systems * where the right mouse button functions as back.) * * The value of this hint is used at runtime, so it can be changed at any time. @@ -147,7 +147,7 @@ extern "C" { /** * \brief Specify an application name. - * + * * This hint lets you specify the application name sent to the OS when * required. For example, this will often appear in volume control applets for * audio streams, and in lists of applications which are inhibiting the @@ -377,6 +377,17 @@ extern "C" { */ #define SDL_HINT_EMSCRIPTEN_KEYBOARD_ELEMENT "SDL_EMSCRIPTEN_KEYBOARD_ELEMENT" +/** + * \brief A variable that controls whether the on-screen keyboard should be shown when text input is active + * + * The variable can be set to the following values: + * "0" - Do not show the on-screen keyboard + * "1" - Show the on-screen keyboard + * + * The default value is "1". This hint must be set before text input is activated. + */ +#define SDL_HINT_ENABLE_SCREEN_KEYBOARD "SDL_ENABLE_SCREEN_KEYBOARD" + /** * \brief A variable that controls whether Steam Controllers should be exposed using the SDL joystick and game controller APIs * @@ -507,7 +518,7 @@ extern "C" { /** * \brief If set, game controller face buttons report their values according to their labels instead of their positional layout. - * + * * For example, on Nintendo Switch controllers, normally you'd get: * * (Y) @@ -569,9 +580,9 @@ extern "C" { * * The variable can be set to the following values: * "0" - SDL_TEXTEDITING events are sent, and it is the application's - * responsibility to render the text from these events and + * responsibility to render the text from these events and * differentiate it somehow from committed text. (default) - * "1" - If supported by the IME then SDL_TEXTEDITING events are not sent, + * "1" - If supported by the IME then SDL_TEXTEDITING events are not sent, * and text that is being composed will be rendered in its own UI. */ #define SDL_HINT_IME_INTERNAL_EDITING "SDL_IME_INTERNAL_EDITING" @@ -1310,6 +1321,8 @@ extern "C" { * * This variable can be one of the following values: * "primary" (default), "portrait", "landscape", "inverted-portrait", "inverted-landscape" + * + * Since SDL 2.0.22 this variable accepts a comma-separated list of values above. */ #define SDL_HINT_QTWAYLAND_CONTENT_ORIENTATION "SDL_QTWAYLAND_CONTENT_ORIENTATION" @@ -1495,7 +1508,7 @@ extern "C" { * disabled. You should use a string that describes what your program is doing * (and, therefore, why the screensaver is disabled). For example, "Playing a * game" or "Watching a video". - * + * * Setting this to "" or leaving it unset will have SDL use a reasonable * default: "Playing a game" or something similar. * @@ -1509,13 +1522,13 @@ extern "C" { * On some platforms, like Linux, a realtime priority thread may be subject to restrictions * that require special handling by the application. This hint exists to let SDL know that * the app is prepared to handle said restrictions. - * + * * On Linux, SDL will apply the following configuration to any thread that becomes realtime: * * The SCHED_RESET_ON_FORK bit will be set on the scheduling policy, * * An RLIMIT_RTTIME budget will be configured to the rtkit specified limit. * * Exceeding this limit will result in the kernel sending SIGKILL to the app, * * Refer to the man pages for more information. - * + * * This variable can be set to the following values: * "0" - default platform specific behaviour * "1" - Force SDL_THREAD_PRIORITY_TIME_CRITICAL to a realtime scheduling policy @@ -1603,7 +1616,7 @@ extern "C" { #define SDL_HINT_TV_REMOTE_AS_JOYSTICK "SDL_TV_REMOTE_AS_JOYSTICK" /** - * \brief A variable controlling whether the screensaver is enabled. + * \brief A variable controlling whether the screensaver is enabled. * * This variable can be set to the following values: * "0" - Disable screensaver @@ -1616,7 +1629,7 @@ extern "C" { /** * \brief Tell the video driver that we only want a double buffer. * - * By default, most lowlevel 2D APIs will use a triple buffer scheme that + * By default, most lowlevel 2D APIs will use a triple buffer scheme that * wastes no CPU time on waiting for vsync after issuing a flip, but * introduces a frame of latency. On the other hand, using a double buffer * scheme instead is recommended for cases where low latency is an important @@ -1747,9 +1760,9 @@ extern "C" { /** * \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 -* SDL_WINDOW_OPENGL set (and running on WGL only, currently), then two things will occur on the newly +* SDL_WINDOW_OPENGL set (and running on WGL only, currently), then two things will occur on the newly * created SDL_Window: * * 1. Its pixel format will be set to the same pixel format as this SDL_Window. This is @@ -1815,13 +1828,13 @@ extern "C" { /** * \brief A variable controlling whether the X11 _NET_WM_BYPASS_COMPOSITOR hint should be used. - * + * * This variable can be set to the following values: * "0" - Disable _NET_WM_BYPASS_COMPOSITOR * "1" - Enable _NET_WM_BYPASS_COMPOSITOR - * + * * By default SDL will use _NET_WM_BYPASS_COMPOSITOR - * + * */ #define SDL_HINT_VIDEO_X11_NET_WM_BYPASS_COMPOSITOR "SDL_VIDEO_X11_NET_WM_BYPASS_COMPOSITOR" @@ -1955,7 +1968,29 @@ extern "C" { #define SDL_HINT_WINDOWS_DISABLE_THREAD_NAMING "SDL_WINDOWS_DISABLE_THREAD_NAMING" /** - * \brief A variable controlling whether the windows message loop is processed by SDL + * \brief Controls whether menus can be opened with their keyboard shortcut (Alt+mnemonic). + * + * If the mnemonics are enabled, then menus can be opened by pressing the Alt + * key and the corresponding mnemonic (for example, Alt+F opens the File menu). + * However, in case an invalid mnemonic is pressed, Windows makes an audible + * beep to convey that nothing happened. This is true even if the window has + * no menu at all! + * + * Because most SDL applications don't have menus, and some want to use the Alt + * key for other purposes, SDL disables mnemonics (and the beeping) by default. + * + * Note: This also affects keyboard events: with mnemonics enabled, when a + * menu is opened from the keyboard, you will not receive a KEYUP event for + * the mnemonic key, and *might* not receive one for Alt. + * + * This variable can be set to the following values: + * "0" - Alt+mnemonic does nothing, no beeping. (default) + * "1" - Alt+mnemonic opens menus, invalid mnemonics produce a beep. + */ +#define SDL_HINT_WINDOWS_ENABLE_MENU_MNEMONICS "SDL_WINDOWS_ENABLE_MENU_MNEMONICS" + +/** + * \brief A variable controlling whether the windows message loop is processed by SDL * * This variable can be set to the following values: * "0" - The window message loop is not run @@ -1996,7 +2031,7 @@ extern "C" { #define SDL_HINT_WINDOWS_FORCE_SEMAPHORE_KERNEL "SDL_WINDOWS_FORCE_SEMAPHORE_KERNEL" /** - * \brief A variable to specify custom icon resource id from RC file on Windows platform + * \brief A variable to specify custom icon resource id from RC file on Windows platform */ #define SDL_HINT_WINDOWS_INTRESOURCE_ICON "SDL_WINDOWS_INTRESOURCE_ICON" #define SDL_HINT_WINDOWS_INTRESOURCE_ICON_SMALL "SDL_WINDOWS_INTRESOURCE_ICON_SMALL" @@ -2035,16 +2070,16 @@ extern "C" { * * This hint must be set before initializing the video subsystem. * - * The main purpose of declaring DPI awareness is to disable OS bitmap scaling of SDL windows on monitors with + * The main purpose of declaring DPI awareness is to disable OS bitmap scaling of SDL windows on monitors with * a DPI scale factor. - * + * * This hint is equivalent to requesting DPI awareness via external means (e.g. calling SetProcessDpiAwarenessContext) * and does not cause SDL to use a virtualized coordinate system, so it will generally give you 1 SDL coordinate = 1 pixel * even on high-DPI displays. - * + * * For more information, see: * https://docs.microsoft.com/en-us/windows/win32/hidpi/high-dpi-desktop-application-development-on-windows - * + * * This variable can be set to the following values: * "" - Do not change the DPI awareness (default). * "unaware" - Declare the process as DPI unaware. (Windows 8.1 and later). @@ -2062,16 +2097,16 @@ extern "C" { /** * \brief Uses DPI-scaled points as the SDL coordinate system on Windows. - * + * * This changes the SDL coordinate system units to be DPI-scaled points, rather than pixels everywhere. * This means windows will be appropriately sized, even when created on high-DPI displays with scaling. - * + * * e.g. requesting a 640x480 window from SDL, on a display with 125% scaling in Windows display settings, * will create a window with an 800x600 client area (in pixels). * * Setting this to "1" implicitly requests process DPI awareness (setting SDL_WINDOWS_DPI_AWARENESS is unnecessary), * and forces SDL_WINDOW_ALLOW_HIGHDPI on all windows. - * + * * This variable can be set to the following values: * "0" - SDL coordinates equal Windows coordinates. No automatic window resizing when dragging * between monitors with different scale factors (unless this is performed by @@ -2082,7 +2117,7 @@ extern "C" { #define SDL_HINT_WINDOWS_DPI_SCALING "SDL_WINDOWS_DPI_SCALING" /** - * \brief A variable controlling whether the window frame and title bar are interactive when the cursor is hidden + * \brief A variable controlling whether the window frame and title bar are interactive when the cursor is hidden * * This variable can be set to the following values: * "0" - The window frame is not interactive when the cursor is hidden (no move, resize, etc) @@ -2093,7 +2128,7 @@ extern "C" { #define SDL_HINT_WINDOW_FRAME_USABLE_WHILE_CURSOR_HIDDEN "SDL_WINDOW_FRAME_USABLE_WHILE_CURSOR_HIDDEN" /** -* \brief A variable controlling whether the window is activated when the SDL_ShowWindow function is called +* \brief A variable controlling whether the window is activated when the SDL_ShowWindow function is called * * This variable can be set to the following values: * "0" - The window is activated when the SDL_ShowWindow function is called diff --git a/release/macos/pt2-clone-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_joystick.h b/release/macos/pt2-clone-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_joystick.h index ace6d8e..8c05fdb 100644 --- a/release/macos/pt2-clone-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_joystick.h +++ b/release/macos/pt2-clone-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_joystick.h @@ -44,6 +44,7 @@ #include #include #include +#include #include /* Set up for C function definitions, even when using C++ */ @@ -66,6 +67,9 @@ extern "C" { /** * The joystick structure used to identify an SDL joystick */ +#ifdef SDL_THREAD_SAFETY_ANALYSIS +extern SDL_mutex *SDL_joystick_lock; +#endif struct _SDL_Joystick; typedef struct _SDL_Joystick SDL_Joystick; @@ -131,7 +135,7 @@ typedef enum * * \since This function is available since SDL 2.0.7. */ -extern DECLSPEC void SDLCALL SDL_LockJoysticks(void); +extern DECLSPEC void SDLCALL SDL_LockJoysticks(void) SDL_ACQUIRE(SDL_joystick_lock); /** @@ -146,7 +150,7 @@ extern DECLSPEC void SDLCALL SDL_LockJoysticks(void); * * \since This function is available since SDL 2.0.7. */ -extern DECLSPEC void SDLCALL SDL_UnlockJoysticks(void); +extern DECLSPEC void SDLCALL SDL_UnlockJoysticks(void) SDL_RELEASE(SDL_joystick_lock); /** * Count the number of joysticks attached to the system. @@ -284,13 +288,12 @@ extern DECLSPEC SDL_JoystickType SDLCALL SDL_JoystickGetDeviceType(int device_in /** * Get the instance ID of a joystick. * - * This can be called before any joysticks are opened. If the index is out of - * range, this function will return -1. + * This can be called before any joysticks are opened. * * \param device_index the index of the joystick to query (the N'th joystick * on the system * \returns the instance id of the selected joystick. If called on an invalid - * index, this function returns zero + * index, this function returns -1. * * \since This function is available since SDL 2.0.6. */ diff --git a/release/macos/pt2-clone-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_keycode.h b/release/macos/pt2-clone-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_keycode.h index 0fef3a1..cc08478 100644 --- a/release/macos/pt2-clone-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_keycode.h +++ b/release/macos/pt2-clone-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_keycode.h @@ -40,7 +40,7 @@ * an SDLK_* constant for those keys that do not generate characters. * * A special exception is the number keys at the top of the keyboard which - * always map to SDLK_0...SDLK_9, regardless of layout. + * map to SDLK_0...SDLK_9 on AZERTY layouts. */ typedef Sint32 SDL_Keycode; diff --git a/release/macos/pt2-clone-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_main.h b/release/macos/pt2-clone-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_main.h index f6edd26..8e938ca 100644 --- a/release/macos/pt2-clone-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_main.h +++ b/release/macos/pt2-clone-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_main.h @@ -263,6 +263,13 @@ extern DECLSPEC int SDLCALL SDL_UIKitRunApp(int argc, char *argv[], SDL_main_fun */ extern DECLSPEC int SDLCALL SDL_GDKRunApp(SDL_main_func mainFunction, void *reserved); +/** + * Callback from the application to let the suspend continue. + * + * \since This function is available since SDL 2.28.0. + */ +extern DECLSPEC void SDLCALL SDL_GDKSuspendComplete(void); + #endif /* __GDK__ */ #ifdef __cplusplus diff --git a/release/macos/pt2-clone-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_mouse.h b/release/macos/pt2-clone-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_mouse.h index 89186ab..5b224ec 100644 --- a/release/macos/pt2-clone-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_mouse.h +++ b/release/macos/pt2-clone-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_mouse.h @@ -198,13 +198,9 @@ extern DECLSPEC int SDLCALL SDL_WarpMouseGlobal(int x, int y); /** * Set relative mouse mode. * - * While the mouse is in relative mode, the cursor is hidden, and the driver - * will try to report continuous motion in the current window. Only relative - * motion events will be delivered, the mouse position will not change. - * - * Note that this function will not be able to provide continuous relative - * motion when used over Microsoft Remote Desktop, instead motion is limited - * to the bounds of the screen. + * While the mouse is in relative mode, the cursor is hidden, the mouse + * position is constrained to the window, and SDL will report continuous + * relative mouse motion even if the mouse is at the edge of the window. * * This function will flush any pending mouse motion. * @@ -389,6 +385,9 @@ extern DECLSPEC SDL_Cursor *SDLCALL SDL_GetCursor(void); /** * Get the default cursor. * + * You do not have to call SDL_FreeCursor() on the return value, but it is + * safe to do so. + * * \returns the default cursor on success or NULL on failure. * * \since This function is available since SDL 2.0.0. diff --git a/release/macos/pt2-clone-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_mutex.h b/release/macos/pt2-clone-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_mutex.h index 88d0d14..d4afb6f 100644 --- a/release/macos/pt2-clone-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_mutex.h +++ b/release/macos/pt2-clone-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_mutex.h @@ -31,6 +31,80 @@ #include #include +/******************************************************************************/ +/* Enable thread safety attributes only with clang. + * The attributes can be safely erased when compiling with other compilers. + */ +#if defined(SDL_THREAD_SAFETY_ANALYSIS) && \ + defined(__clang__) && (!defined(SWIG)) +#define SDL_THREAD_ANNOTATION_ATTRIBUTE__(x) __attribute__((x)) +#else +#define SDL_THREAD_ANNOTATION_ATTRIBUTE__(x) /* no-op */ +#endif + +#define SDL_CAPABILITY(x) \ + SDL_THREAD_ANNOTATION_ATTRIBUTE__(capability(x)) + +#define SDL_SCOPED_CAPABILITY \ + SDL_THREAD_ANNOTATION_ATTRIBUTE__(scoped_lockable) + +#define SDL_GUARDED_BY(x) \ + SDL_THREAD_ANNOTATION_ATTRIBUTE__(guarded_by(x)) + +#define SDL_PT_GUARDED_BY(x) \ + SDL_THREAD_ANNOTATION_ATTRIBUTE__(pt_guarded_by(x)) + +#define SDL_ACQUIRED_BEFORE(x) \ + SDL_THREAD_ANNOTATION_ATTRIBUTE__(acquired_before(x)) + +#define SDL_ACQUIRED_AFTER(x) \ + SDL_THREAD_ANNOTATION_ATTRIBUTE__(acquired_after(x)) + +#define SDL_REQUIRES(x) \ + SDL_THREAD_ANNOTATION_ATTRIBUTE__(requires_capability(x)) + +#define SDL_REQUIRES_SHARED(x) \ + SDL_THREAD_ANNOTATION_ATTRIBUTE__(requires_shared_capability(x)) + +#define SDL_ACQUIRE(x) \ + SDL_THREAD_ANNOTATION_ATTRIBUTE__(acquire_capability(x)) + +#define SDL_ACQUIRE_SHARED(x) \ + SDL_THREAD_ANNOTATION_ATTRIBUTE__(acquire_shared_capability(x)) + +#define SDL_RELEASE(x) \ + SDL_THREAD_ANNOTATION_ATTRIBUTE__(release_capability(x)) + +#define SDL_RELEASE_SHARED(x) \ + SDL_THREAD_ANNOTATION_ATTRIBUTE__(release_shared_capability(x)) + +#define SDL_RELEASE_GENERIC(x) \ + SDL_THREAD_ANNOTATION_ATTRIBUTE__(release_generic_capability(x)) + +#define SDL_TRY_ACQUIRE(x, y) \ + SDL_THREAD_ANNOTATION_ATTRIBUTE__(try_acquire_capability(x, y)) + +#define SDL_TRY_ACQUIRE_SHARED(x, y) \ + SDL_THREAD_ANNOTATION_ATTRIBUTE__(try_acquire_shared_capability(x, y)) + +#define SDL_EXCLUDES(x) \ + SDL_THREAD_ANNOTATION_ATTRIBUTE__(locks_excluded(x)) + +#define SDL_ASSERT_CAPABILITY(x) \ + SDL_THREAD_ANNOTATION_ATTRIBUTE__(assert_capability(x)) + +#define SDL_ASSERT_SHARED_CAPABILITY(x) \ + SDL_THREAD_ANNOTATION_ATTRIBUTE__(assert_shared_capability(x)) + +#define SDL_RETURN_CAPABILITY(x) \ + SDL_THREAD_ANNOTATION_ATTRIBUTE__(lock_returned(x)) + +#define SDL_NO_THREAD_SAFETY_ANALYSIS \ + SDL_THREAD_ANNOTATION_ATTRIBUTE__(no_thread_safety_analysis) + +/******************************************************************************/ + + #include /* Set up for C function definitions, even when using C++ */ #ifdef __cplusplus @@ -96,7 +170,7 @@ extern DECLSPEC SDL_mutex *SDLCALL SDL_CreateMutex(void); * * \since This function is available since SDL 2.0.0. */ -extern DECLSPEC int SDLCALL SDL_LockMutex(SDL_mutex * mutex); +extern DECLSPEC int SDLCALL SDL_LockMutex(SDL_mutex * mutex) SDL_ACQUIRE(mutex); #define SDL_mutexP(m) SDL_LockMutex(m) /** @@ -119,7 +193,7 @@ extern DECLSPEC int SDLCALL SDL_LockMutex(SDL_mutex * mutex); * \sa SDL_LockMutex * \sa SDL_UnlockMutex */ -extern DECLSPEC int SDLCALL SDL_TryLockMutex(SDL_mutex * mutex); +extern DECLSPEC int SDLCALL SDL_TryLockMutex(SDL_mutex * mutex) SDL_TRY_ACQUIRE(0, mutex); /** * Unlock the mutex. @@ -138,7 +212,7 @@ extern DECLSPEC int SDLCALL SDL_TryLockMutex(SDL_mutex * mutex); * * \since This function is available since SDL 2.0.0. */ -extern DECLSPEC int SDLCALL SDL_UnlockMutex(SDL_mutex * mutex); +extern DECLSPEC int SDLCALL SDL_UnlockMutex(SDL_mutex * mutex) SDL_RELEASE(mutex); #define SDL_mutexV(m) SDL_UnlockMutex(m) /** @@ -276,7 +350,7 @@ extern DECLSPEC int SDLCALL SDL_SemTryWait(SDL_sem * sem); * successful it will atomically decrement the semaphore value. * * \param sem the semaphore to wait on - * \param ms the length of the timeout, in milliseconds + * \param timeout the length of the timeout, in milliseconds * \returns 0 if the wait succeeds, `SDL_MUTEX_TIMEDOUT` if the wait does not * succeed in the allotted time, or a negative error code on failure; * call SDL_GetError() for more information. @@ -290,7 +364,7 @@ extern DECLSPEC int SDLCALL SDL_SemTryWait(SDL_sem * sem); * \sa SDL_SemValue * \sa SDL_SemWait */ -extern DECLSPEC int SDLCALL SDL_SemWaitTimeout(SDL_sem * sem, Uint32 ms); +extern DECLSPEC int SDLCALL SDL_SemWaitTimeout(SDL_sem *sem, Uint32 timeout); /** * Atomically increment a semaphore's value and wake waiting threads. diff --git a/release/macos/pt2-clone-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_opengl_glext.h b/release/macos/pt2-clone-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_opengl_glext.h index 8527e17..ff6ad12 100644 --- a/release/macos/pt2-clone-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_opengl_glext.h +++ b/release/macos/pt2-clone-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_opengl_glext.h @@ -1,4 +1,8 @@ -#ifndef __gl_glext_h_ +/* SDL modified the include guard to be compatible with Mesa and Apple include guards: + * - Mesa uses: __gl_glext_h_ + * - Apple uses: __glext_h_ */ +#if !defined(__glext_h_) && !defined(__gl_glext_h_) +#define __glext_h_ 1 #define __gl_glext_h_ 1 #ifdef __cplusplus diff --git a/release/macos/pt2-clone-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_power.h b/release/macos/pt2-clone-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_power.h index 5e4b705..0d5bb9c 100644 --- a/release/macos/pt2-clone-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_power.h +++ b/release/macos/pt2-clone-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_power.h @@ -48,7 +48,6 @@ typedef enum SDL_POWERSTATE_CHARGED /**< Plugged in, battery charged */ } SDL_PowerState; - /** * Get the current power supply details. * @@ -65,17 +64,17 @@ typedef enum * It's possible a platform can only report battery percentage or time left * but not both. * - * \param secs seconds of battery life left, you can pass a NULL here if you - * don't care, will return -1 if we can't determine a value, or - * we're not running on a battery - * \param pct percentage of battery life left, between 0 and 100, you can pass - * a NULL here if you don't care, will return -1 if we can't - * determine a value, or we're not running on a battery + * \param seconds seconds of battery life left, you can pass a NULL here if + * you don't care, will return -1 if we can't determine a + * value, or we're not running on a battery + * \param percent percentage of battery life left, between 0 and 100, you can + * pass a NULL here if you don't care, will return -1 if we + * can't determine a value, or we're not running on a battery * \returns an SDL_PowerState enum representing the current battery state. * * \since This function is available since SDL 2.0.0. */ -extern DECLSPEC SDL_PowerState SDLCALL SDL_GetPowerInfo(int *secs, int *pct); +extern DECLSPEC SDL_PowerState SDLCALL SDL_GetPowerInfo(int *seconds, int *percent); /* Ends C function definitions when using C++ */ #ifdef __cplusplus diff --git a/release/macos/pt2-clone-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_render.h b/release/macos/pt2-clone-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_render.h index b1ca75d..1a9166a 100644 --- a/release/macos/pt2-clone-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_render.h +++ b/release/macos/pt2-clone-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_render.h @@ -1731,6 +1731,11 @@ extern DECLSPEC int SDLCALL SDL_RenderReadPixels(SDL_Renderer * renderer, * * \param renderer the rendering context * + * \threadsafety You may only call this function on the main thread. If this + * happens to work on a background thread on any given platform + * or backend, it's purely by luck and you should not rely on it + * to work next time. + * * \since This function is available since SDL 2.0.0. * * \sa SDL_RenderClear diff --git a/release/macos/pt2-clone-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_revision.h b/release/macos/pt2-clone-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_revision.h index ffb5c6b..dd26edf 100644 --- a/release/macos/pt2-clone-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_revision.h +++ b/release/macos/pt2-clone-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_revision.h @@ -1,7 +1,7 @@ /* Generated by updaterev.sh, do not edit */ #ifdef SDL_VENDOR_INFO -#define SDL_REVISION "SDL-release-2.26.5-0-gac13ca9ab (" SDL_VENDOR_INFO ")" +#define SDL_REVISION "SDL-release-2.28.0-0-gffa78e6be (" SDL_VENDOR_INFO ")" #else -#define SDL_REVISION "SDL-release-2.26.5-0-gac13ca9ab" +#define SDL_REVISION "SDL-release-2.28.0-0-gffa78e6be" #endif #define SDL_REVISION_NUMBER 0 diff --git a/release/macos/pt2-clone-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_sensor.h b/release/macos/pt2-clone-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_sensor.h index 12fb061..85129ba 100644 --- a/release/macos/pt2-clone-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_sensor.h +++ b/release/macos/pt2-clone-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_sensor.h @@ -84,7 +84,7 @@ typedef enum * The accelerometer returns the current acceleration in SI meters per * second squared. This measurement includes the force of gravity, so * a device at rest will have an value of SDL_STANDARD_GRAVITY away - * from the center of the earth. + * from the center of the earth, which is a positive Y value. * * values[0]: Acceleration on the x axis * values[1]: Acceleration on the y axis diff --git a/release/macos/pt2-clone-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_stdinc.h b/release/macos/pt2-clone-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_stdinc.h index d40effa..f4f7fcc 100644 --- a/release/macos/pt2-clone-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_stdinc.h +++ b/release/macos/pt2-clone-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_stdinc.h @@ -30,12 +30,6 @@ #include -#ifdef __APPLE__ -#ifndef _DARWIN_C_SOURCE -#define _DARWIN_C_SOURCE 1 /* for memset_pattern4() */ -#endif -#endif - #ifdef HAVE_SYS_TYPES_H #include #endif @@ -85,7 +79,9 @@ Visual Studio. See http://msdn.microsoft.com/en-us/library/4hwaceh6.aspx for more information. */ -# define _USE_MATH_DEFINES +# ifndef _USE_MATH_DEFINES +# define _USE_MATH_DEFINES +# endif # endif # include #endif @@ -528,9 +524,7 @@ extern DECLSPEC void *SDLCALL SDL_memset(SDL_OUT_BYTECAP(len) void *dst, int c, /* Note that memset() is a byte assignment and this is a 32-bit assignment, so they're not directly equivalent. */ SDL_FORCE_INLINE void SDL_memset4(void *dst, Uint32 val, size_t dwords) { -#ifdef __APPLE__ - memset_pattern4(dst, &val, dwords * 4); -#elif defined(__GNUC__) && defined(__i386__) +#if defined(__GNUC__) && defined(__i386__) int u0, u1, u2; __asm__ __volatile__ ( "cld \n\t" @@ -694,7 +688,7 @@ extern DECLSPEC size_t SDLCALL SDL_iconv(SDL_iconv_t cd, const char **inbuf, size_t * outbytesleft); /** - * This function converts a string between encodings in one pass, returning a + * This function converts a buffer or string between encodings in one pass, returning a * string that must be freed with SDL_free() or NULL on error. * * \since This function is available since SDL 2.0.0. @@ -722,6 +716,20 @@ size_t strlcpy(char* dst, const char* src, size_t size); size_t strlcat(char* dst, const char* src, size_t size); #endif +#ifndef HAVE_WCSLCPY +size_t wcslcpy(wchar_t *dst, const wchar_t *src, size_t size); +#endif + +#ifndef HAVE_WCSLCAT +size_t wcslcat(wchar_t *dst, const wchar_t *src, size_t size); +#endif + +/* Starting LLVM 16, the analyser errors out if these functions do not have + their prototype defined (clang-diagnostic-implicit-function-declaration) */ +#include +#include +#include + #define SDL_malloc malloc #define SDL_calloc calloc #define SDL_realloc realloc diff --git a/release/macos/pt2-clone-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_thread.h b/release/macos/pt2-clone-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_thread.h index 0b19651..fad1afb 100644 --- a/release/macos/pt2-clone-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_thread.h +++ b/release/macos/pt2-clone-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_thread.h @@ -35,7 +35,7 @@ #include #include -#if defined(__WIN32__) || defined(__GDK__) +#if (defined(__WIN32__) || defined(__GDK__)) && !defined(__WINRT__) #include /* _beginthreadex() and _endthreadex() */ #endif #if defined(__OS2__) /* for _beginthread() and _endthread() */ @@ -88,7 +88,7 @@ typedef enum { typedef int (SDLCALL * SDL_ThreadFunction) (void *data); -#if defined(__WIN32__) || defined(__GDK__) +#if (defined(__WIN32__) || defined(__GDK__)) && !defined(__WINRT__) /** * \file SDL_thread.h * diff --git a/release/macos/pt2-clone-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_version.h b/release/macos/pt2-clone-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_version.h index 0fca7db..eedaf9d 100644 --- a/release/macos/pt2-clone-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_version.h +++ b/release/macos/pt2-clone-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_version.h @@ -58,8 +58,8 @@ typedef struct SDL_version /* Printable format: "%d.%d.%d", MAJOR, MINOR, PATCHLEVEL */ #define SDL_MAJOR_VERSION 2 -#define SDL_MINOR_VERSION 26 -#define SDL_PATCHLEVEL 5 +#define SDL_MINOR_VERSION 28 +#define SDL_PATCHLEVEL 0 /** * Macro to determine SDL version program was compiled against. diff --git a/release/macos/pt2-clone-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_video.h b/release/macos/pt2-clone-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_video.h index 48504c0..d1da813 100644 --- a/release/macos/pt2-clone-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_video.h +++ b/release/macos/pt2-clone-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_video.h @@ -187,7 +187,8 @@ typedef enum SDL_DISPLAYEVENT_NONE, /**< Never used */ SDL_DISPLAYEVENT_ORIENTATION, /**< Display orientation has changed to data1 */ SDL_DISPLAYEVENT_CONNECTED, /**< Display has been added to the system */ - SDL_DISPLAYEVENT_DISCONNECTED /**< Display has been removed from the system */ + SDL_DISPLAYEVENT_DISCONNECTED, /**< Display has been removed from the system */ + SDL_DISPLAYEVENT_MOVED /**< Display has changed position */ } SDL_DisplayEventID; /** @@ -1274,6 +1275,17 @@ extern DECLSPEC void SDLCALL SDL_RestoreWindow(SDL_Window * window); extern DECLSPEC int SDLCALL SDL_SetWindowFullscreen(SDL_Window * window, Uint32 flags); +/** + * Return whether the window has a surface associated with it. + * + * \returns SDL_TRUE if there is a surface associated with the window, or SDL_FALSE otherwise. + * + * \since This function is available since SDL 2.28.0. + * + * \sa SDL_GetWindowSurface + */ +extern DECLSPEC SDL_bool SDLCALL SDL_HasWindowSurface(SDL_Window *window); + /** * Get the SDL surface associated with the window. * @@ -1294,6 +1306,8 @@ extern DECLSPEC int SDLCALL SDL_SetWindowFullscreen(SDL_Window * window, * * \since This function is available since SDL 2.0.0. * + * \sa SDL_DestroyWindowSurface + * \sa SDL_HasWindowSurface * \sa SDL_UpdateWindowSurface * \sa SDL_UpdateWindowSurfaceRects */ @@ -1328,7 +1342,7 @@ extern DECLSPEC int SDLCALL SDL_UpdateWindowSurface(SDL_Window * window); * * \param window the window to update * \param rects an array of SDL_Rect structures representing areas of the - * surface to copy + * surface to copy, in pixels * \param numrects the number of rectangles * \returns 0 on success or a negative error code on failure; call * SDL_GetError() for more information. @@ -1342,6 +1356,20 @@ extern DECLSPEC int SDLCALL SDL_UpdateWindowSurfaceRects(SDL_Window * window, const SDL_Rect * rects, int numrects); +/** + * Destroy the surface associated with the window. + * + * \param window the window to update + * \returns 0 on success or a negative error code on failure; call + * SDL_GetError() for more information. + * + * \since This function is available since SDL 2.28.0. + * + * \sa SDL_GetWindowSurface + * \sa SDL_HasWindowSurface + */ +extern DECLSPEC int SDLCALL SDL_DestroyWindowSurface(SDL_Window *window); + /** * Set a window's input grab mode. * diff --git a/release/macos/pt2-clone-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/begin_code.h b/release/macos/pt2-clone-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/begin_code.h index 1f01e0b..4142ffe 100644 --- a/release/macos/pt2-clone-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/begin_code.h +++ b/release/macos/pt2-clone-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/begin_code.h @@ -28,10 +28,10 @@ */ /* This shouldn't be nested -- included it around code only. */ -#ifdef _begin_code_h +#ifdef SDL_begin_code_h #error Nested inclusion of begin_code.h #endif -#define _begin_code_h +#define SDL_begin_code_h #ifndef SDL_DEPRECATED # if defined(__GNUC__) && (__GNUC__ >= 4) /* technically, this arrived in gcc 3.1, but oh well. */ @@ -171,17 +171,17 @@ #define SDL_FALLTHROUGH [[fallthrough]] #else #if defined(__has_attribute) -#define _HAS_FALLTHROUGH __has_attribute(__fallthrough__) +#define SDL_HAS_FALLTHROUGH __has_attribute(__fallthrough__) #else -#define _HAS_FALLTHROUGH 0 +#define SDL_HAS_FALLTHROUGH 0 #endif /* __has_attribute */ -#if _HAS_FALLTHROUGH && \ +#if SDL_HAS_FALLTHROUGH && \ ((defined(__GNUC__) && __GNUC__ >= 7) || \ (defined(__clang_major__) && __clang_major__ >= 10)) #define SDL_FALLTHROUGH __attribute__((__fallthrough__)) #else #define SDL_FALLTHROUGH do {} while (0) /* fallthrough */ -#endif /* _HAS_FALLTHROUGH */ -#undef _HAS_FALLTHROUGH +#endif /* SDL_HAS_FALLTHROUGH */ +#undef SDL_HAS_FALLTHROUGH #endif /* C++17 or C2x */ #endif /* SDL_FALLTHROUGH not defined */ diff --git a/release/macos/pt2-clone-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/close_code.h b/release/macos/pt2-clone-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/close_code.h index 874a926..b5ff3e2 100644 --- a/release/macos/pt2-clone-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/close_code.h +++ b/release/macos/pt2-clone-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/close_code.h @@ -26,10 +26,10 @@ * after you finish any function and structure declarations in your headers */ -#ifndef _begin_code_h +#ifndef SDL_begin_code_h #error close_code.h included without matching begin_code.h #endif -#undef _begin_code_h +#undef SDL_begin_code_h /* Reset structure packing at previous byte alignment */ #if defined(_MSC_VER) || defined(__MWERKS__) || defined(__BORLANDC__) diff --git a/release/macos/pt2-clone-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Resources/CMake/sdl2-config.cmake b/release/macos/pt2-clone-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Resources/CMake/sdl2-config.cmake index 28c34bc..e1b7713 100644 --- a/release/macos/pt2-clone-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Resources/CMake/sdl2-config.cmake +++ b/release/macos/pt2-clone-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Resources/CMake/sdl2-config.cmake @@ -57,6 +57,8 @@ if(NOT TARGET SDL2::SDL2) INTERFACE_LINK_OPTIONS "SHELL:-F \"${SDL2_FRAMEWORK_PARENT_PATH}\";SHELL:-framework SDL2" COMPATIBLE_INTERFACE_BOOL "SDL2_SHARED" INTERFACE_SDL2_SHARED "ON" + COMPATIBLE_INTERFACE_STRING "SDL_VERSION" + INTERFACE_SDL_VERSION "SDL2" ) endif() set(SDL2_SDL2_FOUND TRUE) diff --git a/release/macos/pt2-clone-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Resources/Info.plist b/release/macos/pt2-clone-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Resources/Info.plist index 01563ad..6cce908 100644 --- a/release/macos/pt2-clone-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Resources/Info.plist +++ b/release/macos/pt2-clone-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/Resources/Info.plist @@ -3,7 +3,7 @@ BuildMachineOSBuild - 22D68 + 22F66 CFBundleDevelopmentRegion English CFBundleExecutable @@ -19,7 +19,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 2.26.5 + 2.28.0 CFBundleSignature SDLX CFBundleSupportedPlatforms @@ -27,7 +27,7 @@ MacOSX CFBundleVersion - 2.26.5 + 2.28.0 DTCompiler com.apple.compilers.llvm.clang.1_0 DTPlatformBuild @@ -41,9 +41,9 @@ DTSDKName macosx13.3 DTXcode - 1430 + 1431 DTXcodeBuild - 14E222b + 14E300c LSMinimumSystemVersion 10.11 diff --git a/release/macos/pt2-clone-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/SDL2 b/release/macos/pt2-clone-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/SDL2 index 8364974..46b7233 100644 Binary files a/release/macos/pt2-clone-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/SDL2 and b/release/macos/pt2-clone-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/SDL2 differ diff --git a/release/macos/pt2-clone-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/_CodeSignature/CodeResources b/release/macos/pt2-clone-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/_CodeSignature/CodeResources index 465c162..6d8949e 100644 --- a/release/macos/pt2-clone-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/_CodeSignature/CodeResources +++ b/release/macos/pt2-clone-macos.app/Contents/Frameworks/SDL2.framework/Versions/A/_CodeSignature/CodeResources @@ -10,11 +10,11 @@ Resources/CMake/sdl2-config.cmake - aottfZnkkRrcejRrYqK2L/49GIU= + s2hXhDxzy/ilC+gLamGy/Kq13jo= Resources/Info.plist - ECcyTBfZPucOFnTMf7BSonyduBg= + MP8SsWNX9fsyVRo11YwxKezmPug= Resources/License.txt @@ -57,22 +57,22 @@ hash - TaFJjJYsOXON8iaLEX5xgfJH0FI= + FTCyRgMQ1IzdGYV2XbCDSQ7JNec= hash2 - nmWpPus/eISidEuuFqvVp/7XY07q4kHIRaT63X/reVA= + 4iFngSAorzMM520V+2V1sriu9mL12sLlPrhNfgT12Ck= Headers/SDL_audio.h hash - 16xbool8mbuYWNC2lmIqMxUmlZQ= + ATRDpv42XjNUWqjKPDAPYqIqvDY= hash2 - fqqrBPvDux0Z4lIvqQKdhOVSZRLcTBx0Qva8cbLp418= + MThYj7HEVNC7MdUTbzgyHDqlDMDS9g664b6M5d7tsdY= Headers/SDL_bits.h @@ -90,11 +90,11 @@ hash - zzSdvjZ9hKJxyC3VzOOwKmq61/U= + ThQw2vcWPo/mLtvKmhQrjhSQhLk= hash2 - BD+r9teOyEpTHM6NwvtQPhrazAj5e2wzwqQ/EqWKgVg= + o3UtzbWJqnTeh6+r+oLVdOzcJZ1b3XhfPINDjKHftu4= Headers/SDL_clipboard.h @@ -156,11 +156,11 @@ hash - MHpy1KvnqOf64f2781BUtUz0DEI= + j6/tuHiJfdv8YaI9k3fogDw4bNc= hash2 - AmEG80oborsu7cRbeBBS2zyDKvyxTT2kh0M7rYrm2HI= + P5KOVzR2wBlhdSw7biIJ3O78dnYnoGdi4pHxvyFcLdY= Headers/SDL_error.h @@ -200,11 +200,11 @@ hash - RMJ7KpEMN4aYVe8PvF0XyjhXVOc= + DGpJeIYXN/t/Yyqilband2kKOSk= hash2 - dJDgv9TNy/SgR2cADGxsSrwu1NZX2fYO830svryW4uc= + hgAaf8SQwVfc94yXKjNFA3VpsTCYwL65W5X6lXEnsgI= Headers/SDL_gesture.h @@ -255,22 +255,22 @@ hash - j33d96aUBrEwCVm9GpDBW1CXvVo= + M/nqf8jyrXJ9IrgLrVffOZG4Jlo= hash2 - WiHkNUFgiALKRxAIDQuaaU+Y6gKgtqw8YmZHPMtPyK4= + nCUBVEvtWTQ2Ab/H1a9n4I68tT572DhjMnne+N52bwY= Headers/SDL_joystick.h hash - 85/bNiER9h5QVoRQLNEZGF5VD3E= + Y/dkiMb7+9Wmo8oyyOuh4igQK4o= hash2 - l5rSDksaaBXPl3GCffxGblOMgjvcufJSuuCglByf2yM= + d3rYIj9RV45IuiYZAbOQyNe3iR4DORkkqwYiSA81c6k= Headers/SDL_keyboard.h @@ -288,11 +288,11 @@ hash - h18H9W8J7wesaRF2OApJEb2RFrY= + j4z7vftDr05ahrBr5bZnBxZ3Ufs= hash2 - zv9BVIERwcpba8USfGXPAzRO/qMWBbB5bWLDqEwWSYU= + abAEws/ibkdlWSE/bP/uq0oIjcebU59aul5g4Lu0pbA= Headers/SDL_loadso.h @@ -332,11 +332,11 @@ hash - kDbuJzb/pBtb1iutYnW/hASbKgw= + j0/bBvlkrYcnXeoB6sWoCQiIlV0= hash2 - oIwpcrlXtl8XSnVMj+EmGESlisYv8O//EaDdoAd2xm0= + QOjL/8v8HMC/N+1jocNxIGBB5pifTDWxbwOvD7wJtRg= Headers/SDL_messagebox.h @@ -376,22 +376,22 @@ hash - wWyr5YJRLgkouejijZizd1f54ZE= + AL6jjX5llLXh3nscuX0MJQQJ7C0= hash2 - TN4Ft0Tl8FBtChEmqaC9q+ihzrGRO2+oE6f4FPqM754= + 8R3uVCCs2wF9vtwJEqAi+xjYtAtJ1F6UIqCPUhiBwxU= Headers/SDL_mutex.h hash - LOlLQylQ4fAuTL6ywn5mc7YHggg= + c4s6haEURwhr1L/ZsIoQHgDC1Rw= hash2 - Xe+WvrizruQy0+uhYKV3UHknz8I5FnrW8AnSAwZJOfw= + L1kG6r9N1C+njGEvU0sAJeAVFwr6gkCCwGcBxsjDuNU= Headers/SDL_name.h @@ -420,11 +420,11 @@ hash - z3QoX44hLSqeS5sCphMCc8TAxno= + eOvalGUielSzNuOWWDLYkwqpYrg= hash2 - B2j/0LKCjlQl51aWvbslDd3Qc3C2JhJHMPu6C+u3CSs= + GrsoiRybBmG2/zdJ3iZx2l/hK+tbyxgzsta99ciezfg= Headers/SDL_opengles.h @@ -519,11 +519,11 @@ hash - smMe7j3MNIT7wXXFRtMvGPFulso= + SmO5g1nUZ1IAgDQGIlzbR8F5udg= hash2 - mwBQ8l0GVg+f+/FeIU3sMgo9JAY7X3uq4NPwOc27IL8= + Lmp/XdN6xQbqR/eAmoKFcpqk+MM65gGxjv1cLYUqG8c= Headers/SDL_quit.h @@ -552,22 +552,22 @@ hash - wLdzEIMoOvdQScGrBT0EjqjYTso= + sNcVNpmlpcvsqJmBOwyg6hjTWQ8= hash2 - xu0LmkwhR+b10K+nmKQ5XVpWOfKEHEEVTq0Ryswak3c= + 1EY74HfczRb8zZ3CZfcoinmI8nVMwFaoIfcvG7kPBEE= Headers/SDL_revision.h hash - XNd3ECdYFSFaaMv/uj3NwyatWcY= + sRLTPAglYSZ19Pdm+afA2j47taM= hash2 - FzAYjxrloDaswbapi8PCqNyMRjro8m4e4gSgAHWrJ8o= + Fo7p72CdM/uZzX9nxLeCot/MrKYwSKmo0ESISIMTIOI= Headers/SDL_rwops.h @@ -596,11 +596,11 @@ hash - Pf6/Yj0hIgsUlhqj4UGylm+TjQs= + J+9woN1Qec074rah/rly1BHM5sY= hash2 - 5fAvXcuJcCx8/Et36VSkGacoiTENdiTe2BanIplHa2Y= + sEfbN4S8Lpxm0XDblgOvnVV0fsgx/zo/q0s5h9OvhmE= Headers/SDL_shape.h @@ -618,11 +618,11 @@ hash - 5MtebnJHZfnCFhT9MeT6pg3EoPI= + iliyExriwpoxEAgG8CI8CG8go54= hash2 - qf4ijhTzMO4g9aKUrU+z10KfGRbOKVg3jIUS7TKrovA= + I4aI+ExJq+16kZfDjF++Uaa2lHZjUWmuFc83IUDfuIk= Headers/SDL_surface.h @@ -662,11 +662,11 @@ hash - bCVCxCLiY7Rkx02GC2u37KSejsU= + rdWafQMEiS2pSqeEGdRXDjaU96Q= hash2 - Qhsj5cNniFikrpQc/wnB/IipdeR8tFkywQAEwSyernM= + pVkN+av2tjneOX9IafFyXjDRaWe/ROSrLwUQRfCrYYA= Headers/SDL_timer.h @@ -706,22 +706,22 @@ hash - QDqwH27Tmjz8nMPphdVAZqPqGt0= + BrMh/0kZeBHu8Xr+/5hS8IHcMfU= hash2 - nk6h9XDXojUkw/F8Ff7er08rfzKTzlMT0jLr2lPMgv8= + tIqaCIDNMsT9rQ9arELIo8WVF04pSMBtxaavylyyrK4= Headers/SDL_video.h hash - YAMYz1pUQobEWpC1EuOB5YmsIZc= + oDSfm7hvyakVAn3MJ/vPYpDiTi8= hash2 - bFi0k6PF8xpOpR6X0Wsidxl7LIWX2hVGjSysd6roB6A= + 4kgMp+1L702uCbe5U3mPNYx/zonCSDmAoqKxZGMWlC0= Headers/SDL_vulkan.h @@ -739,22 +739,22 @@ hash - f6TnCZT882PpPk816tLLYBb5tJM= + BXr58UQDjOvu3YEpLqbL6MzdnEw= hash2 - G4bzpDXzXe091TEGmuQxF+N64ZDTNg32tUjyDAYJXmE= + lZjnBGKuQiSupwtm3kZTliIMMPlHVmUsVTRtQ7E0WMU= Headers/close_code.h hash - pzX1cw2hHQdMFCO0VcO1VVsfXUo= + b9BWGnHVTllZJNggBlv8S0bczLA= hash2 - +ybA2nqIwfLyUQ9Pf9ZLXUyXMGNS3xZMEowuIcqIrRQ= + /x8Gxc1GaIoziXOz/sebI7d0PytDiEWi8kWZfjkp0Ww= Resources/CMake/sdl2-config-version.cmake @@ -772,22 +772,22 @@ hash - aottfZnkkRrcejRrYqK2L/49GIU= + s2hXhDxzy/ilC+gLamGy/Kq13jo= hash2 - NtAgweQRe487Cy32/RioObq+KAq6SXdUsRtQZaAvT6U= + DuTUW8idzRp7WT1FT5x/m1C1SbVH0FKvKRKOgVlRVhU= Resources/Info.plist hash - ECcyTBfZPucOFnTMf7BSonyduBg= + MP8SsWNX9fsyVRo11YwxKezmPug= hash2 - 4i5aYnvsU/2ssKdrpU5A9mYIX4q4fzaqinS7xOcPTyY= + JS+9bRfZuLgojqjIgCYRqSXUyJ5L/MJO+Cyss5R17Rs= Resources/License.txt diff --git a/release/win32/SDL2.dll b/release/win32/SDL2.dll index 6959783..64789ee 100644 Binary files a/release/win32/SDL2.dll and b/release/win32/SDL2.dll differ diff --git a/release/win64/SDL2.dll b/release/win64/SDL2.dll index d0050c9..d48b854 100644 Binary files a/release/win64/SDL2.dll and b/release/win64/SDL2.dll differ diff --git a/src/pt2_header.h b/src/pt2_header.h index bed8ad9..75ed439 100644 --- a/src/pt2_header.h +++ b/src/pt2_header.h @@ -14,7 +14,7 @@ #include "pt2_unicode.h" #include "pt2_palette.h" -#define PROG_VER_STR "1.60" +#define PROG_VER_STR "1.61" #ifdef _WIN32 #define DIR_DELIMITER '\\' diff --git a/src/pt2_main.c b/src/pt2_main.c index 08ec2e5..a97a9dc 100644 --- a/src/pt2_main.c +++ b/src/pt2_main.c @@ -42,7 +42,7 @@ module_t *song = NULL; // globalized -static bool backupMadeAfterCrash, didDropFile; +static bool backupMadeAfterCrash; #ifdef _WIN32 #define SYSMSG_FILE_ARG (WM_USER + 1) @@ -372,6 +372,7 @@ int main(int argc, char *argv[]) static void handleInput(void) { + SDL_Event event; while (SDL_PollEvent(&event)) { @@ -408,12 +409,11 @@ static void handleInput(void) } else if (event.type == SDL_DROPFILE) { - // kludge: allow focus-clickthrough after drag-n-drop - SDL_SetHint(SDL_HINT_MOUSE_FOCUS_CLICKTHROUGH, "1"); - didDropFile = true; - loadDroppedFile(event.drop.file, (uint32_t)strlen(event.drop.file), false, true); SDL_free(event.drop.file); + + SDL_RestoreWindow(video.window); + SDL_RaiseWindow(video.window); } else if (event.type == SDL_QUIT) { @@ -450,13 +450,6 @@ static void handleInput(void) ui.introTextShown = false; } - - // kludge: we drag-n-dropped a file before this mouse click release, restore focus-clickthrough mode - if (didDropFile) - { - didDropFile = false; - SDL_SetHint(SDL_HINT_MOUSE_FOCUS_CLICKTHROUGH, "0"); - } } else if (event.type == SDL_MOUSEBUTTONDOWN) { @@ -861,6 +854,12 @@ static void handleSysMsg(SDL_Event inputEvent) UnmapViewOfFile(sharedMemBuf); sharedMemBuf = NULL; + + if (video.window != NULL) + { + SDL_RestoreWindow(video.window); + SDL_RaiseWindow(video.window); + } } CloseHandle(hMapFile); diff --git a/vs2019_project/pt2-clone/SDL2.dll b/vs2019_project/pt2-clone/SDL2.dll index 6959783..64789ee 100644 Binary files a/vs2019_project/pt2-clone/SDL2.dll and b/vs2019_project/pt2-clone/SDL2.dll differ diff --git a/vs2019_project/pt2-clone/sdl/include/SDL2/SDL_atomic.h b/vs2019_project/pt2-clone/sdl/include/SDL2/SDL_atomic.h index 22ea019..8273287 100644 --- a/vs2019_project/pt2-clone/sdl/include/SDL2/SDL_atomic.h +++ b/vs2019_project/pt2-clone/sdl/include/SDL2/SDL_atomic.h @@ -249,9 +249,8 @@ typedef void (*SDL_KernelMemoryBarrierFunc)(); #elif defined(_MSC_VER) && (defined(_M_ARM) || defined(_M_ARM64)) #define SDL_CPUPauseInstruction() __yield() #elif defined(__WATCOMC__) && defined(__386__) - /* watcom assembler rejects PAUSE if CPU < i686, and it refuses REP NOP as an invalid combination. Hardcode the bytes. */ extern __inline void SDL_CPUPauseInstruction(void); - #pragma aux SDL_CPUPauseInstruction = "db 0f3h,90h" + #pragma aux SDL_CPUPauseInstruction = ".686p" ".xmm2" "pause" #else #define SDL_CPUPauseInstruction() #endif diff --git a/vs2019_project/pt2-clone/sdl/include/SDL2/SDL_audio.h b/vs2019_project/pt2-clone/sdl/include/SDL2/SDL_audio.h index 2c0f211..ccd3598 100644 --- a/vs2019_project/pt2-clone/sdl/include/SDL2/SDL_audio.h +++ b/vs2019_project/pt2-clone/sdl/include/SDL2/SDL_audio.h @@ -169,13 +169,13 @@ typedef void (SDLCALL * SDL_AudioCallback) (void *userdata, Uint8 * stream, * The calculated values in this structure are calculated by SDL_OpenAudio(). * * For multi-channel audio, the default SDL channel mapping is: - * 2: FL FR (stereo) - * 3: FL FR LFE (2.1 surround) - * 4: FL FR BL BR (quad) - * 5: FL FR LFE BL BR (4.1 surround) - * 6: FL FR FC LFE SL SR (5.1 surround - last two can also be BL BR) - * 7: FL FR FC LFE BC SL SR (6.1 surround) - * 8: FL FR FC LFE BL BR SL SR (7.1 surround) + * 2: FL FR (stereo) + * 3: FL FR LFE (2.1 surround) + * 4: FL FR BL BR (quad) + * 5: FL FR LFE BL BR (4.1 surround) + * 6: FL FR FC LFE SL SR (5.1 surround - last two can also be BL BR) + * 7: FL FR FC LFE BC SL SR (6.1 surround) + * 8: FL FR FC LFE BL BR SL SR (7.1 surround) */ typedef struct SDL_AudioSpec { diff --git a/vs2019_project/pt2-clone/sdl/include/SDL2/SDL_blendmode.h b/vs2019_project/pt2-clone/sdl/include/SDL2/SDL_blendmode.h index b862116..4ecbe50 100644 --- a/vs2019_project/pt2-clone/sdl/include/SDL2/SDL_blendmode.h +++ b/vs2019_project/pt2-clone/sdl/include/SDL2/SDL_blendmode.h @@ -52,7 +52,7 @@ typedef enum dstA = dstA */ SDL_BLENDMODE_MUL = 0x00000008, /**< color multiply dstRGB = (srcRGB * dstRGB) + (dstRGB * (1-srcA)) - dstA = (srcA * dstA) + (dstA * (1-srcA)) */ + dstA = dstA */ SDL_BLENDMODE_INVALID = 0x7FFFFFFF /* Additional custom blend modes can be returned by SDL_ComposeCustomBlendMode() */ diff --git a/vs2019_project/pt2-clone/sdl/include/SDL2/SDL_endian.h b/vs2019_project/pt2-clone/sdl/include/SDL2/SDL_endian.h index 582c3a8..71bc067 100644 --- a/vs2019_project/pt2-clone/sdl/include/SDL2/SDL_endian.h +++ b/vs2019_project/pt2-clone/sdl/include/SDL2/SDL_endian.h @@ -140,7 +140,7 @@ extern "C" { #if HAS_BUILTIN_BSWAP16 #define SDL_Swap16(x) __builtin_bswap16(x) -#elif defined(_MSC_VER) && (_MSC_VER >= 1400) +#elif (defined(_MSC_VER) && (_MSC_VER >= 1400)) && !defined(__ICL) #pragma intrinsic(_byteswap_ushort) #define SDL_Swap16(x) _byteswap_ushort(x) #elif defined(__i386__) && !HAS_BROKEN_BSWAP @@ -189,7 +189,7 @@ SDL_Swap16(Uint16 x) #if HAS_BUILTIN_BSWAP32 #define SDL_Swap32(x) __builtin_bswap32(x) -#elif defined(_MSC_VER) && (_MSC_VER >= 1400) +#elif (defined(_MSC_VER) && (_MSC_VER >= 1400)) && !defined(__ICL) #pragma intrinsic(_byteswap_ulong) #define SDL_Swap32(x) _byteswap_ulong(x) #elif defined(__i386__) && !HAS_BROKEN_BSWAP @@ -241,7 +241,7 @@ SDL_Swap32(Uint32 x) #if HAS_BUILTIN_BSWAP64 #define SDL_Swap64(x) __builtin_bswap64(x) -#elif defined(_MSC_VER) && (_MSC_VER >= 1400) +#elif (defined(_MSC_VER) && (_MSC_VER >= 1400)) && !defined(__ICL) #pragma intrinsic(_byteswap_uint64) #define SDL_Swap64(x) _byteswap_uint64(x) #elif defined(__i386__) && !HAS_BROKEN_BSWAP diff --git a/vs2019_project/pt2-clone/sdl/include/SDL2/SDL_gamecontroller.h b/vs2019_project/pt2-clone/sdl/include/SDL2/SDL_gamecontroller.h index d66e1b0..140054d 100644 --- a/vs2019_project/pt2-clone/sdl/include/SDL2/SDL_gamecontroller.h +++ b/vs2019_project/pt2-clone/sdl/include/SDL2/SDL_gamecontroller.h @@ -724,10 +724,10 @@ typedef enum SDL_CONTROLLER_BUTTON_DPAD_LEFT, SDL_CONTROLLER_BUTTON_DPAD_RIGHT, SDL_CONTROLLER_BUTTON_MISC1, /* Xbox Series X share button, PS5 microphone button, Nintendo Switch Pro capture button, Amazon Luna microphone button */ - SDL_CONTROLLER_BUTTON_PADDLE1, /* Xbox Elite paddle P1 */ - SDL_CONTROLLER_BUTTON_PADDLE2, /* Xbox Elite paddle P3 */ - SDL_CONTROLLER_BUTTON_PADDLE3, /* Xbox Elite paddle P2 */ - SDL_CONTROLLER_BUTTON_PADDLE4, /* Xbox Elite paddle P4 */ + SDL_CONTROLLER_BUTTON_PADDLE1, /* Xbox Elite paddle P1 (upper left, facing the back) */ + SDL_CONTROLLER_BUTTON_PADDLE2, /* Xbox Elite paddle P3 (upper right, facing the back) */ + SDL_CONTROLLER_BUTTON_PADDLE3, /* Xbox Elite paddle P2 (lower left, facing the back) */ + SDL_CONTROLLER_BUTTON_PADDLE4, /* Xbox Elite paddle P4 (lower right, facing the back) */ SDL_CONTROLLER_BUTTON_TOUCHPAD, /* PS4/PS5 touchpad button */ SDL_CONTROLLER_BUTTON_MAX } SDL_GameControllerButton; diff --git a/vs2019_project/pt2-clone/sdl/include/SDL2/SDL_hints.h b/vs2019_project/pt2-clone/sdl/include/SDL2/SDL_hints.h index 1317924..ad3b403 100644 --- a/vs2019_project/pt2-clone/sdl/include/SDL2/SDL_hints.h +++ b/vs2019_project/pt2-clone/sdl/include/SDL2/SDL_hints.h @@ -92,7 +92,7 @@ extern "C" { * By default this hint is not set and the APK expansion files are not searched. */ #define SDL_HINT_ANDROID_APK_EXPANSION_MAIN_FILE_VERSION "SDL_ANDROID_APK_EXPANSION_MAIN_FILE_VERSION" - + /** * \brief Android APK expansion patch file version. Should be a string number like "1", "2" etc. * @@ -132,13 +132,13 @@ extern "C" { * \brief A variable to control whether we trap the Android back button to handle it manually. * This is necessary for the right mouse button to work on some Android devices, or * to be able to trap the back button for use in your code reliably. If set to true, - * the back button will show up as an SDL_KEYDOWN / SDL_KEYUP pair with a keycode of + * the back button will show up as an SDL_KEYDOWN / SDL_KEYUP pair with a keycode of * SDL_SCANCODE_AC_BACK. * * The variable can be set to the following values: * "0" - Back button will be handled as usual for system. (default) * "1" - Back button will be trapped, allowing you to handle the key press - * manually. (This will also let right mouse click work on systems + * manually. (This will also let right mouse click work on systems * where the right mouse button functions as back.) * * The value of this hint is used at runtime, so it can be changed at any time. @@ -147,7 +147,7 @@ extern "C" { /** * \brief Specify an application name. - * + * * This hint lets you specify the application name sent to the OS when * required. For example, this will often appear in volume control applets for * audio streams, and in lists of applications which are inhibiting the @@ -377,6 +377,17 @@ extern "C" { */ #define SDL_HINT_EMSCRIPTEN_KEYBOARD_ELEMENT "SDL_EMSCRIPTEN_KEYBOARD_ELEMENT" +/** + * \brief A variable that controls whether the on-screen keyboard should be shown when text input is active + * + * The variable can be set to the following values: + * "0" - Do not show the on-screen keyboard + * "1" - Show the on-screen keyboard + * + * The default value is "1". This hint must be set before text input is activated. + */ +#define SDL_HINT_ENABLE_SCREEN_KEYBOARD "SDL_ENABLE_SCREEN_KEYBOARD" + /** * \brief A variable that controls whether Steam Controllers should be exposed using the SDL joystick and game controller APIs * @@ -507,7 +518,7 @@ extern "C" { /** * \brief If set, game controller face buttons report their values according to their labels instead of their positional layout. - * + * * For example, on Nintendo Switch controllers, normally you'd get: * * (Y) @@ -569,9 +580,9 @@ extern "C" { * * The variable can be set to the following values: * "0" - SDL_TEXTEDITING events are sent, and it is the application's - * responsibility to render the text from these events and + * responsibility to render the text from these events and * differentiate it somehow from committed text. (default) - * "1" - If supported by the IME then SDL_TEXTEDITING events are not sent, + * "1" - If supported by the IME then SDL_TEXTEDITING events are not sent, * and text that is being composed will be rendered in its own UI. */ #define SDL_HINT_IME_INTERNAL_EDITING "SDL_IME_INTERNAL_EDITING" @@ -1310,6 +1321,8 @@ extern "C" { * * This variable can be one of the following values: * "primary" (default), "portrait", "landscape", "inverted-portrait", "inverted-landscape" + * + * Since SDL 2.0.22 this variable accepts a comma-separated list of values above. */ #define SDL_HINT_QTWAYLAND_CONTENT_ORIENTATION "SDL_QTWAYLAND_CONTENT_ORIENTATION" @@ -1495,7 +1508,7 @@ extern "C" { * disabled. You should use a string that describes what your program is doing * (and, therefore, why the screensaver is disabled). For example, "Playing a * game" or "Watching a video". - * + * * Setting this to "" or leaving it unset will have SDL use a reasonable * default: "Playing a game" or something similar. * @@ -1509,13 +1522,13 @@ extern "C" { * On some platforms, like Linux, a realtime priority thread may be subject to restrictions * that require special handling by the application. This hint exists to let SDL know that * the app is prepared to handle said restrictions. - * + * * On Linux, SDL will apply the following configuration to any thread that becomes realtime: * * The SCHED_RESET_ON_FORK bit will be set on the scheduling policy, * * An RLIMIT_RTTIME budget will be configured to the rtkit specified limit. * * Exceeding this limit will result in the kernel sending SIGKILL to the app, * * Refer to the man pages for more information. - * + * * This variable can be set to the following values: * "0" - default platform specific behaviour * "1" - Force SDL_THREAD_PRIORITY_TIME_CRITICAL to a realtime scheduling policy @@ -1603,7 +1616,7 @@ extern "C" { #define SDL_HINT_TV_REMOTE_AS_JOYSTICK "SDL_TV_REMOTE_AS_JOYSTICK" /** - * \brief A variable controlling whether the screensaver is enabled. + * \brief A variable controlling whether the screensaver is enabled. * * This variable can be set to the following values: * "0" - Disable screensaver @@ -1616,7 +1629,7 @@ extern "C" { /** * \brief Tell the video driver that we only want a double buffer. * - * By default, most lowlevel 2D APIs will use a triple buffer scheme that + * By default, most lowlevel 2D APIs will use a triple buffer scheme that * wastes no CPU time on waiting for vsync after issuing a flip, but * introduces a frame of latency. On the other hand, using a double buffer * scheme instead is recommended for cases where low latency is an important @@ -1747,9 +1760,9 @@ extern "C" { /** * \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 -* SDL_WINDOW_OPENGL set (and running on WGL only, currently), then two things will occur on the newly +* SDL_WINDOW_OPENGL set (and running on WGL only, currently), then two things will occur on the newly * created SDL_Window: * * 1. Its pixel format will be set to the same pixel format as this SDL_Window. This is @@ -1815,13 +1828,13 @@ extern "C" { /** * \brief A variable controlling whether the X11 _NET_WM_BYPASS_COMPOSITOR hint should be used. - * + * * This variable can be set to the following values: * "0" - Disable _NET_WM_BYPASS_COMPOSITOR * "1" - Enable _NET_WM_BYPASS_COMPOSITOR - * + * * By default SDL will use _NET_WM_BYPASS_COMPOSITOR - * + * */ #define SDL_HINT_VIDEO_X11_NET_WM_BYPASS_COMPOSITOR "SDL_VIDEO_X11_NET_WM_BYPASS_COMPOSITOR" @@ -1955,7 +1968,29 @@ extern "C" { #define SDL_HINT_WINDOWS_DISABLE_THREAD_NAMING "SDL_WINDOWS_DISABLE_THREAD_NAMING" /** - * \brief A variable controlling whether the windows message loop is processed by SDL + * \brief Controls whether menus can be opened with their keyboard shortcut (Alt+mnemonic). + * + * If the mnemonics are enabled, then menus can be opened by pressing the Alt + * key and the corresponding mnemonic (for example, Alt+F opens the File menu). + * However, in case an invalid mnemonic is pressed, Windows makes an audible + * beep to convey that nothing happened. This is true even if the window has + * no menu at all! + * + * Because most SDL applications don't have menus, and some want to use the Alt + * key for other purposes, SDL disables mnemonics (and the beeping) by default. + * + * Note: This also affects keyboard events: with mnemonics enabled, when a + * menu is opened from the keyboard, you will not receive a KEYUP event for + * the mnemonic key, and *might* not receive one for Alt. + * + * This variable can be set to the following values: + * "0" - Alt+mnemonic does nothing, no beeping. (default) + * "1" - Alt+mnemonic opens menus, invalid mnemonics produce a beep. + */ +#define SDL_HINT_WINDOWS_ENABLE_MENU_MNEMONICS "SDL_WINDOWS_ENABLE_MENU_MNEMONICS" + +/** + * \brief A variable controlling whether the windows message loop is processed by SDL * * This variable can be set to the following values: * "0" - The window message loop is not run @@ -1996,7 +2031,7 @@ extern "C" { #define SDL_HINT_WINDOWS_FORCE_SEMAPHORE_KERNEL "SDL_WINDOWS_FORCE_SEMAPHORE_KERNEL" /** - * \brief A variable to specify custom icon resource id from RC file on Windows platform + * \brief A variable to specify custom icon resource id from RC file on Windows platform */ #define SDL_HINT_WINDOWS_INTRESOURCE_ICON "SDL_WINDOWS_INTRESOURCE_ICON" #define SDL_HINT_WINDOWS_INTRESOURCE_ICON_SMALL "SDL_WINDOWS_INTRESOURCE_ICON_SMALL" @@ -2035,16 +2070,16 @@ extern "C" { * * This hint must be set before initializing the video subsystem. * - * The main purpose of declaring DPI awareness is to disable OS bitmap scaling of SDL windows on monitors with + * The main purpose of declaring DPI awareness is to disable OS bitmap scaling of SDL windows on monitors with * a DPI scale factor. - * + * * This hint is equivalent to requesting DPI awareness via external means (e.g. calling SetProcessDpiAwarenessContext) * and does not cause SDL to use a virtualized coordinate system, so it will generally give you 1 SDL coordinate = 1 pixel * even on high-DPI displays. - * + * * For more information, see: * https://docs.microsoft.com/en-us/windows/win32/hidpi/high-dpi-desktop-application-development-on-windows - * + * * This variable can be set to the following values: * "" - Do not change the DPI awareness (default). * "unaware" - Declare the process as DPI unaware. (Windows 8.1 and later). @@ -2062,16 +2097,16 @@ extern "C" { /** * \brief Uses DPI-scaled points as the SDL coordinate system on Windows. - * + * * This changes the SDL coordinate system units to be DPI-scaled points, rather than pixels everywhere. * This means windows will be appropriately sized, even when created on high-DPI displays with scaling. - * + * * e.g. requesting a 640x480 window from SDL, on a display with 125% scaling in Windows display settings, * will create a window with an 800x600 client area (in pixels). * * Setting this to "1" implicitly requests process DPI awareness (setting SDL_WINDOWS_DPI_AWARENESS is unnecessary), * and forces SDL_WINDOW_ALLOW_HIGHDPI on all windows. - * + * * This variable can be set to the following values: * "0" - SDL coordinates equal Windows coordinates. No automatic window resizing when dragging * between monitors with different scale factors (unless this is performed by @@ -2082,7 +2117,7 @@ extern "C" { #define SDL_HINT_WINDOWS_DPI_SCALING "SDL_WINDOWS_DPI_SCALING" /** - * \brief A variable controlling whether the window frame and title bar are interactive when the cursor is hidden + * \brief A variable controlling whether the window frame and title bar are interactive when the cursor is hidden * * This variable can be set to the following values: * "0" - The window frame is not interactive when the cursor is hidden (no move, resize, etc) @@ -2093,7 +2128,7 @@ extern "C" { #define SDL_HINT_WINDOW_FRAME_USABLE_WHILE_CURSOR_HIDDEN "SDL_WINDOW_FRAME_USABLE_WHILE_CURSOR_HIDDEN" /** -* \brief A variable controlling whether the window is activated when the SDL_ShowWindow function is called +* \brief A variable controlling whether the window is activated when the SDL_ShowWindow function is called * * This variable can be set to the following values: * "0" - The window is activated when the SDL_ShowWindow function is called diff --git a/vs2019_project/pt2-clone/sdl/include/SDL2/SDL_joystick.h b/vs2019_project/pt2-clone/sdl/include/SDL2/SDL_joystick.h index 07d6a2e..b9b4f62 100644 --- a/vs2019_project/pt2-clone/sdl/include/SDL2/SDL_joystick.h +++ b/vs2019_project/pt2-clone/sdl/include/SDL2/SDL_joystick.h @@ -44,6 +44,7 @@ #include "SDL_stdinc.h" #include "SDL_error.h" #include "SDL_guid.h" +#include "SDL_mutex.h" #include "begin_code.h" /* Set up for C function definitions, even when using C++ */ @@ -66,6 +67,9 @@ extern "C" { /** * The joystick structure used to identify an SDL joystick */ +#ifdef SDL_THREAD_SAFETY_ANALYSIS +extern SDL_mutex *SDL_joystick_lock; +#endif struct _SDL_Joystick; typedef struct _SDL_Joystick SDL_Joystick; @@ -131,7 +135,7 @@ typedef enum * * \since This function is available since SDL 2.0.7. */ -extern DECLSPEC void SDLCALL SDL_LockJoysticks(void); +extern DECLSPEC void SDLCALL SDL_LockJoysticks(void) SDL_ACQUIRE(SDL_joystick_lock); /** @@ -146,7 +150,7 @@ extern DECLSPEC void SDLCALL SDL_LockJoysticks(void); * * \since This function is available since SDL 2.0.7. */ -extern DECLSPEC void SDLCALL SDL_UnlockJoysticks(void); +extern DECLSPEC void SDLCALL SDL_UnlockJoysticks(void) SDL_RELEASE(SDL_joystick_lock); /** * Count the number of joysticks attached to the system. @@ -284,13 +288,12 @@ extern DECLSPEC SDL_JoystickType SDLCALL SDL_JoystickGetDeviceType(int device_in /** * Get the instance ID of a joystick. * - * This can be called before any joysticks are opened. If the index is out of - * range, this function will return -1. + * This can be called before any joysticks are opened. * * \param device_index the index of the joystick to query (the N'th joystick * on the system * \returns the instance id of the selected joystick. If called on an invalid - * index, this function returns zero + * index, this function returns -1. * * \since This function is available since SDL 2.0.6. */ diff --git a/vs2019_project/pt2-clone/sdl/include/SDL2/SDL_keycode.h b/vs2019_project/pt2-clone/sdl/include/SDL2/SDL_keycode.h index 2523506..7106223 100644 --- a/vs2019_project/pt2-clone/sdl/include/SDL2/SDL_keycode.h +++ b/vs2019_project/pt2-clone/sdl/include/SDL2/SDL_keycode.h @@ -40,7 +40,7 @@ * an SDLK_* constant for those keys that do not generate characters. * * A special exception is the number keys at the top of the keyboard which - * always map to SDLK_0...SDLK_9, regardless of layout. + * map to SDLK_0...SDLK_9 on AZERTY layouts. */ typedef Sint32 SDL_Keycode; diff --git a/vs2019_project/pt2-clone/sdl/include/SDL2/SDL_main.h b/vs2019_project/pt2-clone/sdl/include/SDL2/SDL_main.h index 14d39f1..5cc8e59 100644 --- a/vs2019_project/pt2-clone/sdl/include/SDL2/SDL_main.h +++ b/vs2019_project/pt2-clone/sdl/include/SDL2/SDL_main.h @@ -263,6 +263,13 @@ extern DECLSPEC int SDLCALL SDL_UIKitRunApp(int argc, char *argv[], SDL_main_fun */ extern DECLSPEC int SDLCALL SDL_GDKRunApp(SDL_main_func mainFunction, void *reserved); +/** + * Callback from the application to let the suspend continue. + * + * \since This function is available since SDL 2.28.0. + */ +extern DECLSPEC void SDLCALL SDL_GDKSuspendComplete(void); + #endif /* __GDK__ */ #ifdef __cplusplus diff --git a/vs2019_project/pt2-clone/sdl/include/SDL2/SDL_mouse.h b/vs2019_project/pt2-clone/sdl/include/SDL2/SDL_mouse.h index c5712ef..aa07575 100644 --- a/vs2019_project/pt2-clone/sdl/include/SDL2/SDL_mouse.h +++ b/vs2019_project/pt2-clone/sdl/include/SDL2/SDL_mouse.h @@ -198,13 +198,9 @@ extern DECLSPEC int SDLCALL SDL_WarpMouseGlobal(int x, int y); /** * Set relative mouse mode. * - * While the mouse is in relative mode, the cursor is hidden, and the driver - * will try to report continuous motion in the current window. Only relative - * motion events will be delivered, the mouse position will not change. - * - * Note that this function will not be able to provide continuous relative - * motion when used over Microsoft Remote Desktop, instead motion is limited - * to the bounds of the screen. + * While the mouse is in relative mode, the cursor is hidden, the mouse + * position is constrained to the window, and SDL will report continuous + * relative mouse motion even if the mouse is at the edge of the window. * * This function will flush any pending mouse motion. * @@ -389,6 +385,9 @@ extern DECLSPEC SDL_Cursor *SDLCALL SDL_GetCursor(void); /** * Get the default cursor. * + * You do not have to call SDL_FreeCursor() on the return value, but it is + * safe to do so. + * * \returns the default cursor on success or NULL on failure. * * \since This function is available since SDL 2.0.0. diff --git a/vs2019_project/pt2-clone/sdl/include/SDL2/SDL_mutex.h b/vs2019_project/pt2-clone/sdl/include/SDL2/SDL_mutex.h index 54b6a53..e679d38 100644 --- a/vs2019_project/pt2-clone/sdl/include/SDL2/SDL_mutex.h +++ b/vs2019_project/pt2-clone/sdl/include/SDL2/SDL_mutex.h @@ -31,6 +31,80 @@ #include "SDL_stdinc.h" #include "SDL_error.h" +/******************************************************************************/ +/* Enable thread safety attributes only with clang. + * The attributes can be safely erased when compiling with other compilers. + */ +#if defined(SDL_THREAD_SAFETY_ANALYSIS) && \ + defined(__clang__) && (!defined(SWIG)) +#define SDL_THREAD_ANNOTATION_ATTRIBUTE__(x) __attribute__((x)) +#else +#define SDL_THREAD_ANNOTATION_ATTRIBUTE__(x) /* no-op */ +#endif + +#define SDL_CAPABILITY(x) \ + SDL_THREAD_ANNOTATION_ATTRIBUTE__(capability(x)) + +#define SDL_SCOPED_CAPABILITY \ + SDL_THREAD_ANNOTATION_ATTRIBUTE__(scoped_lockable) + +#define SDL_GUARDED_BY(x) \ + SDL_THREAD_ANNOTATION_ATTRIBUTE__(guarded_by(x)) + +#define SDL_PT_GUARDED_BY(x) \ + SDL_THREAD_ANNOTATION_ATTRIBUTE__(pt_guarded_by(x)) + +#define SDL_ACQUIRED_BEFORE(x) \ + SDL_THREAD_ANNOTATION_ATTRIBUTE__(acquired_before(x)) + +#define SDL_ACQUIRED_AFTER(x) \ + SDL_THREAD_ANNOTATION_ATTRIBUTE__(acquired_after(x)) + +#define SDL_REQUIRES(x) \ + SDL_THREAD_ANNOTATION_ATTRIBUTE__(requires_capability(x)) + +#define SDL_REQUIRES_SHARED(x) \ + SDL_THREAD_ANNOTATION_ATTRIBUTE__(requires_shared_capability(x)) + +#define SDL_ACQUIRE(x) \ + SDL_THREAD_ANNOTATION_ATTRIBUTE__(acquire_capability(x)) + +#define SDL_ACQUIRE_SHARED(x) \ + SDL_THREAD_ANNOTATION_ATTRIBUTE__(acquire_shared_capability(x)) + +#define SDL_RELEASE(x) \ + SDL_THREAD_ANNOTATION_ATTRIBUTE__(release_capability(x)) + +#define SDL_RELEASE_SHARED(x) \ + SDL_THREAD_ANNOTATION_ATTRIBUTE__(release_shared_capability(x)) + +#define SDL_RELEASE_GENERIC(x) \ + SDL_THREAD_ANNOTATION_ATTRIBUTE__(release_generic_capability(x)) + +#define SDL_TRY_ACQUIRE(x, y) \ + SDL_THREAD_ANNOTATION_ATTRIBUTE__(try_acquire_capability(x, y)) + +#define SDL_TRY_ACQUIRE_SHARED(x, y) \ + SDL_THREAD_ANNOTATION_ATTRIBUTE__(try_acquire_shared_capability(x, y)) + +#define SDL_EXCLUDES(x) \ + SDL_THREAD_ANNOTATION_ATTRIBUTE__(locks_excluded(x)) + +#define SDL_ASSERT_CAPABILITY(x) \ + SDL_THREAD_ANNOTATION_ATTRIBUTE__(assert_capability(x)) + +#define SDL_ASSERT_SHARED_CAPABILITY(x) \ + SDL_THREAD_ANNOTATION_ATTRIBUTE__(assert_shared_capability(x)) + +#define SDL_RETURN_CAPABILITY(x) \ + SDL_THREAD_ANNOTATION_ATTRIBUTE__(lock_returned(x)) + +#define SDL_NO_THREAD_SAFETY_ANALYSIS \ + SDL_THREAD_ANNOTATION_ATTRIBUTE__(no_thread_safety_analysis) + +/******************************************************************************/ + + #include "begin_code.h" /* Set up for C function definitions, even when using C++ */ #ifdef __cplusplus @@ -96,7 +170,7 @@ extern DECLSPEC SDL_mutex *SDLCALL SDL_CreateMutex(void); * * \since This function is available since SDL 2.0.0. */ -extern DECLSPEC int SDLCALL SDL_LockMutex(SDL_mutex * mutex); +extern DECLSPEC int SDLCALL SDL_LockMutex(SDL_mutex * mutex) SDL_ACQUIRE(mutex); #define SDL_mutexP(m) SDL_LockMutex(m) /** @@ -119,7 +193,7 @@ extern DECLSPEC int SDLCALL SDL_LockMutex(SDL_mutex * mutex); * \sa SDL_LockMutex * \sa SDL_UnlockMutex */ -extern DECLSPEC int SDLCALL SDL_TryLockMutex(SDL_mutex * mutex); +extern DECLSPEC int SDLCALL SDL_TryLockMutex(SDL_mutex * mutex) SDL_TRY_ACQUIRE(0, mutex); /** * Unlock the mutex. @@ -138,7 +212,7 @@ extern DECLSPEC int SDLCALL SDL_TryLockMutex(SDL_mutex * mutex); * * \since This function is available since SDL 2.0.0. */ -extern DECLSPEC int SDLCALL SDL_UnlockMutex(SDL_mutex * mutex); +extern DECLSPEC int SDLCALL SDL_UnlockMutex(SDL_mutex * mutex) SDL_RELEASE(mutex); #define SDL_mutexV(m) SDL_UnlockMutex(m) /** @@ -276,7 +350,7 @@ extern DECLSPEC int SDLCALL SDL_SemTryWait(SDL_sem * sem); * successful it will atomically decrement the semaphore value. * * \param sem the semaphore to wait on - * \param ms the length of the timeout, in milliseconds + * \param timeout the length of the timeout, in milliseconds * \returns 0 if the wait succeeds, `SDL_MUTEX_TIMEDOUT` if the wait does not * succeed in the allotted time, or a negative error code on failure; * call SDL_GetError() for more information. @@ -290,7 +364,7 @@ extern DECLSPEC int SDLCALL SDL_SemTryWait(SDL_sem * sem); * \sa SDL_SemValue * \sa SDL_SemWait */ -extern DECLSPEC int SDLCALL SDL_SemWaitTimeout(SDL_sem * sem, Uint32 ms); +extern DECLSPEC int SDLCALL SDL_SemWaitTimeout(SDL_sem *sem, Uint32 timeout); /** * Atomically increment a semaphore's value and wake waiting threads. diff --git a/vs2019_project/pt2-clone/sdl/include/SDL2/SDL_opengl_glext.h b/vs2019_project/pt2-clone/sdl/include/SDL2/SDL_opengl_glext.h index 8527e17..ff6ad12 100644 --- a/vs2019_project/pt2-clone/sdl/include/SDL2/SDL_opengl_glext.h +++ b/vs2019_project/pt2-clone/sdl/include/SDL2/SDL_opengl_glext.h @@ -1,4 +1,8 @@ -#ifndef __gl_glext_h_ +/* SDL modified the include guard to be compatible with Mesa and Apple include guards: + * - Mesa uses: __gl_glext_h_ + * - Apple uses: __glext_h_ */ +#if !defined(__glext_h_) && !defined(__gl_glext_h_) +#define __glext_h_ 1 #define __gl_glext_h_ 1 #ifdef __cplusplus diff --git a/vs2019_project/pt2-clone/sdl/include/SDL2/SDL_power.h b/vs2019_project/pt2-clone/sdl/include/SDL2/SDL_power.h index be06c8b..1d75704 100644 --- a/vs2019_project/pt2-clone/sdl/include/SDL2/SDL_power.h +++ b/vs2019_project/pt2-clone/sdl/include/SDL2/SDL_power.h @@ -48,7 +48,6 @@ typedef enum SDL_POWERSTATE_CHARGED /**< Plugged in, battery charged */ } SDL_PowerState; - /** * Get the current power supply details. * @@ -65,17 +64,17 @@ typedef enum * It's possible a platform can only report battery percentage or time left * but not both. * - * \param secs seconds of battery life left, you can pass a NULL here if you - * don't care, will return -1 if we can't determine a value, or - * we're not running on a battery - * \param pct percentage of battery life left, between 0 and 100, you can pass - * a NULL here if you don't care, will return -1 if we can't - * determine a value, or we're not running on a battery + * \param seconds seconds of battery life left, you can pass a NULL here if + * you don't care, will return -1 if we can't determine a + * value, or we're not running on a battery + * \param percent percentage of battery life left, between 0 and 100, you can + * pass a NULL here if you don't care, will return -1 if we + * can't determine a value, or we're not running on a battery * \returns an SDL_PowerState enum representing the current battery state. * * \since This function is available since SDL 2.0.0. */ -extern DECLSPEC SDL_PowerState SDLCALL SDL_GetPowerInfo(int *secs, int *pct); +extern DECLSPEC SDL_PowerState SDLCALL SDL_GetPowerInfo(int *seconds, int *percent); /* Ends C function definitions when using C++ */ #ifdef __cplusplus diff --git a/vs2019_project/pt2-clone/sdl/include/SDL2/SDL_render.h b/vs2019_project/pt2-clone/sdl/include/SDL2/SDL_render.h index c729501..d62715a 100644 --- a/vs2019_project/pt2-clone/sdl/include/SDL2/SDL_render.h +++ b/vs2019_project/pt2-clone/sdl/include/SDL2/SDL_render.h @@ -1731,6 +1731,11 @@ extern DECLSPEC int SDLCALL SDL_RenderReadPixels(SDL_Renderer * renderer, * * \param renderer the rendering context * + * \threadsafety You may only call this function on the main thread. If this + * happens to work on a background thread on any given platform + * or backend, it's purely by luck and you should not rely on it + * to work next time. + * * \since This function is available since SDL 2.0.0. * * \sa SDL_RenderClear diff --git a/vs2019_project/pt2-clone/sdl/include/SDL2/SDL_revision.h b/vs2019_project/pt2-clone/sdl/include/SDL2/SDL_revision.h index ffb5c6b..dd26edf 100644 --- a/vs2019_project/pt2-clone/sdl/include/SDL2/SDL_revision.h +++ b/vs2019_project/pt2-clone/sdl/include/SDL2/SDL_revision.h @@ -1,7 +1,7 @@ /* Generated by updaterev.sh, do not edit */ #ifdef SDL_VENDOR_INFO -#define SDL_REVISION "SDL-release-2.26.5-0-gac13ca9ab (" SDL_VENDOR_INFO ")" +#define SDL_REVISION "SDL-release-2.28.0-0-gffa78e6be (" SDL_VENDOR_INFO ")" #else -#define SDL_REVISION "SDL-release-2.26.5-0-gac13ca9ab" +#define SDL_REVISION "SDL-release-2.28.0-0-gffa78e6be" #endif #define SDL_REVISION_NUMBER 0 diff --git a/vs2019_project/pt2-clone/sdl/include/SDL2/SDL_sensor.h b/vs2019_project/pt2-clone/sdl/include/SDL2/SDL_sensor.h index 3010e49..9ecce44 100644 --- a/vs2019_project/pt2-clone/sdl/include/SDL2/SDL_sensor.h +++ b/vs2019_project/pt2-clone/sdl/include/SDL2/SDL_sensor.h @@ -84,7 +84,7 @@ typedef enum * The accelerometer returns the current acceleration in SI meters per * second squared. This measurement includes the force of gravity, so * a device at rest will have an value of SDL_STANDARD_GRAVITY away - * from the center of the earth. + * from the center of the earth, which is a positive Y value. * * values[0]: Acceleration on the x axis * values[1]: Acceleration on the y axis diff --git a/vs2019_project/pt2-clone/sdl/include/SDL2/SDL_stdinc.h b/vs2019_project/pt2-clone/sdl/include/SDL2/SDL_stdinc.h index 2fbe6b9..792cc8d 100644 --- a/vs2019_project/pt2-clone/sdl/include/SDL2/SDL_stdinc.h +++ b/vs2019_project/pt2-clone/sdl/include/SDL2/SDL_stdinc.h @@ -30,12 +30,6 @@ #include "SDL_config.h" -#ifdef __APPLE__ -#ifndef _DARWIN_C_SOURCE -#define _DARWIN_C_SOURCE 1 /* for memset_pattern4() */ -#endif -#endif - #ifdef HAVE_SYS_TYPES_H #include #endif @@ -85,7 +79,9 @@ Visual Studio. See http://msdn.microsoft.com/en-us/library/4hwaceh6.aspx for more information. */ -# define _USE_MATH_DEFINES +# ifndef _USE_MATH_DEFINES +# define _USE_MATH_DEFINES +# endif # endif # include #endif @@ -248,7 +244,7 @@ typedef uint64_t Uint64; #ifdef FLT_EPSILON #define SDL_FLT_EPSILON FLT_EPSILON #else -#define SDL_FLT_EPSILON 0.0000000001f /* 8bitbubsy: had to modify this for VC... */ +#define SDL_FLT_EPSILON 0.0000001f /* 8bitbubsy: had to modify this for MSVC... */ #endif /* @} *//* Floating-point constants */ @@ -528,9 +524,7 @@ extern DECLSPEC void *SDLCALL SDL_memset(SDL_OUT_BYTECAP(len) void *dst, int c, /* Note that memset() is a byte assignment and this is a 32-bit assignment, so they're not directly equivalent. */ SDL_FORCE_INLINE void SDL_memset4(void *dst, Uint32 val, size_t dwords) { -#ifdef __APPLE__ - memset_pattern4(dst, &val, dwords * 4); -#elif defined(__GNUC__) && defined(__i386__) +#if defined(__GNUC__) && defined(__i386__) int u0, u1, u2; __asm__ __volatile__ ( "cld \n\t" @@ -694,7 +688,7 @@ extern DECLSPEC size_t SDLCALL SDL_iconv(SDL_iconv_t cd, const char **inbuf, size_t * outbytesleft); /** - * This function converts a string between encodings in one pass, returning a + * This function converts a buffer or string between encodings in one pass, returning a * string that must be freed with SDL_free() or NULL on error. * * \since This function is available since SDL 2.0.0. @@ -722,6 +716,20 @@ size_t strlcpy(char* dst, const char* src, size_t size); size_t strlcat(char* dst, const char* src, size_t size); #endif +#ifndef HAVE_WCSLCPY +size_t wcslcpy(wchar_t *dst, const wchar_t *src, size_t size); +#endif + +#ifndef HAVE_WCSLCAT +size_t wcslcat(wchar_t *dst, const wchar_t *src, size_t size); +#endif + +/* Starting LLVM 16, the analyser errors out if these functions do not have + their prototype defined (clang-diagnostic-implicit-function-declaration) */ +#include +#include +#include + #define SDL_malloc malloc #define SDL_calloc calloc #define SDL_realloc realloc diff --git a/vs2019_project/pt2-clone/sdl/include/SDL2/SDL_thread.h b/vs2019_project/pt2-clone/sdl/include/SDL2/SDL_thread.h index 849f70b..b829bba 100644 --- a/vs2019_project/pt2-clone/sdl/include/SDL2/SDL_thread.h +++ b/vs2019_project/pt2-clone/sdl/include/SDL2/SDL_thread.h @@ -35,7 +35,7 @@ #include "SDL_atomic.h" #include "SDL_mutex.h" -#if defined(__WIN32__) || defined(__GDK__) +#if (defined(__WIN32__) || defined(__GDK__)) && !defined(__WINRT__) #include /* _beginthreadex() and _endthreadex() */ #endif #if defined(__OS2__) /* for _beginthread() and _endthread() */ @@ -88,7 +88,7 @@ typedef enum { typedef int (SDLCALL * SDL_ThreadFunction) (void *data); -#if defined(__WIN32__) || defined(__GDK__) +#if (defined(__WIN32__) || defined(__GDK__)) && !defined(__WINRT__) /** * \file SDL_thread.h * diff --git a/vs2019_project/pt2-clone/sdl/include/SDL2/SDL_version.h b/vs2019_project/pt2-clone/sdl/include/SDL2/SDL_version.h index 5c357a7..782a7ff 100644 --- a/vs2019_project/pt2-clone/sdl/include/SDL2/SDL_version.h +++ b/vs2019_project/pt2-clone/sdl/include/SDL2/SDL_version.h @@ -58,8 +58,8 @@ typedef struct SDL_version /* Printable format: "%d.%d.%d", MAJOR, MINOR, PATCHLEVEL */ #define SDL_MAJOR_VERSION 2 -#define SDL_MINOR_VERSION 26 -#define SDL_PATCHLEVEL 5 +#define SDL_MINOR_VERSION 28 +#define SDL_PATCHLEVEL 0 /** * Macro to determine SDL version program was compiled against. diff --git a/vs2019_project/pt2-clone/sdl/include/SDL2/SDL_video.h b/vs2019_project/pt2-clone/sdl/include/SDL2/SDL_video.h index c70facb..c8b2d7a 100644 --- a/vs2019_project/pt2-clone/sdl/include/SDL2/SDL_video.h +++ b/vs2019_project/pt2-clone/sdl/include/SDL2/SDL_video.h @@ -187,7 +187,8 @@ typedef enum SDL_DISPLAYEVENT_NONE, /**< Never used */ SDL_DISPLAYEVENT_ORIENTATION, /**< Display orientation has changed to data1 */ SDL_DISPLAYEVENT_CONNECTED, /**< Display has been added to the system */ - SDL_DISPLAYEVENT_DISCONNECTED /**< Display has been removed from the system */ + SDL_DISPLAYEVENT_DISCONNECTED, /**< Display has been removed from the system */ + SDL_DISPLAYEVENT_MOVED /**< Display has changed position */ } SDL_DisplayEventID; /** @@ -1274,6 +1275,17 @@ extern DECLSPEC void SDLCALL SDL_RestoreWindow(SDL_Window * window); extern DECLSPEC int SDLCALL SDL_SetWindowFullscreen(SDL_Window * window, Uint32 flags); +/** + * Return whether the window has a surface associated with it. + * + * \returns SDL_TRUE if there is a surface associated with the window, or SDL_FALSE otherwise. + * + * \since This function is available since SDL 2.28.0. + * + * \sa SDL_GetWindowSurface + */ +extern DECLSPEC SDL_bool SDLCALL SDL_HasWindowSurface(SDL_Window *window); + /** * Get the SDL surface associated with the window. * @@ -1294,6 +1306,8 @@ extern DECLSPEC int SDLCALL SDL_SetWindowFullscreen(SDL_Window * window, * * \since This function is available since SDL 2.0.0. * + * \sa SDL_DestroyWindowSurface + * \sa SDL_HasWindowSurface * \sa SDL_UpdateWindowSurface * \sa SDL_UpdateWindowSurfaceRects */ @@ -1328,7 +1342,7 @@ extern DECLSPEC int SDLCALL SDL_UpdateWindowSurface(SDL_Window * window); * * \param window the window to update * \param rects an array of SDL_Rect structures representing areas of the - * surface to copy + * surface to copy, in pixels * \param numrects the number of rectangles * \returns 0 on success or a negative error code on failure; call * SDL_GetError() for more information. @@ -1342,6 +1356,20 @@ extern DECLSPEC int SDLCALL SDL_UpdateWindowSurfaceRects(SDL_Window * window, const SDL_Rect * rects, int numrects); +/** + * Destroy the surface associated with the window. + * + * \param window the window to update + * \returns 0 on success or a negative error code on failure; call + * SDL_GetError() for more information. + * + * \since This function is available since SDL 2.28.0. + * + * \sa SDL_GetWindowSurface + * \sa SDL_HasWindowSurface + */ +extern DECLSPEC int SDLCALL SDL_DestroyWindowSurface(SDL_Window *window); + /** * Set a window's input grab mode. * diff --git a/vs2019_project/pt2-clone/sdl/include/SDL2/begin_code.h b/vs2019_project/pt2-clone/sdl/include/SDL2/begin_code.h index 1f01e0b..4142ffe 100644 --- a/vs2019_project/pt2-clone/sdl/include/SDL2/begin_code.h +++ b/vs2019_project/pt2-clone/sdl/include/SDL2/begin_code.h @@ -28,10 +28,10 @@ */ /* This shouldn't be nested -- included it around code only. */ -#ifdef _begin_code_h +#ifdef SDL_begin_code_h #error Nested inclusion of begin_code.h #endif -#define _begin_code_h +#define SDL_begin_code_h #ifndef SDL_DEPRECATED # if defined(__GNUC__) && (__GNUC__ >= 4) /* technically, this arrived in gcc 3.1, but oh well. */ @@ -171,17 +171,17 @@ #define SDL_FALLTHROUGH [[fallthrough]] #else #if defined(__has_attribute) -#define _HAS_FALLTHROUGH __has_attribute(__fallthrough__) +#define SDL_HAS_FALLTHROUGH __has_attribute(__fallthrough__) #else -#define _HAS_FALLTHROUGH 0 +#define SDL_HAS_FALLTHROUGH 0 #endif /* __has_attribute */ -#if _HAS_FALLTHROUGH && \ +#if SDL_HAS_FALLTHROUGH && \ ((defined(__GNUC__) && __GNUC__ >= 7) || \ (defined(__clang_major__) && __clang_major__ >= 10)) #define SDL_FALLTHROUGH __attribute__((__fallthrough__)) #else #define SDL_FALLTHROUGH do {} while (0) /* fallthrough */ -#endif /* _HAS_FALLTHROUGH */ -#undef _HAS_FALLTHROUGH +#endif /* SDL_HAS_FALLTHROUGH */ +#undef SDL_HAS_FALLTHROUGH #endif /* C++17 or C2x */ #endif /* SDL_FALLTHROUGH not defined */ diff --git a/vs2019_project/pt2-clone/sdl/include/SDL2/close_code.h b/vs2019_project/pt2-clone/sdl/include/SDL2/close_code.h index 874a926..b5ff3e2 100644 --- a/vs2019_project/pt2-clone/sdl/include/SDL2/close_code.h +++ b/vs2019_project/pt2-clone/sdl/include/SDL2/close_code.h @@ -26,10 +26,10 @@ * after you finish any function and structure declarations in your headers */ -#ifndef _begin_code_h +#ifndef SDL_begin_code_h #error close_code.h included without matching begin_code.h #endif -#undef _begin_code_h +#undef SDL_begin_code_h /* Reset structure packing at previous byte alignment */ #if defined(_MSC_VER) || defined(__MWERKS__) || defined(__BORLANDC__) diff --git a/vs2019_project/pt2-clone/sdl/lib/SDL2.lib b/vs2019_project/pt2-clone/sdl/lib/SDL2.lib index 73c41c6..b35ba62 100644 Binary files a/vs2019_project/pt2-clone/sdl/lib/SDL2.lib and b/vs2019_project/pt2-clone/sdl/lib/SDL2.lib differ diff --git a/vs2019_project/pt2-clone/sdl/lib/SDL2main.lib b/vs2019_project/pt2-clone/sdl/lib/SDL2main.lib index d9a5f8a..eccce23 100644 Binary files a/vs2019_project/pt2-clone/sdl/lib/SDL2main.lib and b/vs2019_project/pt2-clone/sdl/lib/SDL2main.lib differ diff --git a/vs2019_project/pt2-clone/sdl/lib64/SDL2.lib b/vs2019_project/pt2-clone/sdl/lib64/SDL2.lib index f966c7c..99c5321 100644 Binary files a/vs2019_project/pt2-clone/sdl/lib64/SDL2.lib and b/vs2019_project/pt2-clone/sdl/lib64/SDL2.lib differ diff --git a/vs2019_project/pt2-clone/sdl/lib64/SDL2main.lib b/vs2019_project/pt2-clone/sdl/lib64/SDL2main.lib index 7be2a67..241e7c3 100644 Binary files a/vs2019_project/pt2-clone/sdl/lib64/SDL2main.lib and b/vs2019_project/pt2-clone/sdl/lib64/SDL2main.lib differ diff --git a/vs2019_project/x64/Debug/SDL2.dll b/vs2019_project/x64/Debug/SDL2.dll index d0050c9..d48b854 100644 Binary files a/vs2019_project/x64/Debug/SDL2.dll and b/vs2019_project/x64/Debug/SDL2.dll differ