diff --git a/Source/ThirdParty/SDL/SDL3/SDL.h b/Source/ThirdParty/SDL/SDL3/SDL.h index 0042b7ccd..3dba4228b 100644 --- a/Source/ThirdParty/SDL/SDL3/SDL.h +++ b/Source/ThirdParty/SDL/SDL3/SDL.h @@ -20,7 +20,7 @@ */ /** - * Main include header for the SDL library, version 3.1.7 + * Main include header for the SDL library, version 3.1.9 * * It is almost always best to include just this one header instead of * picking out individual headers included here. There are exceptions to diff --git a/Source/ThirdParty/SDL/SDL3/SDL_assert.h b/Source/ThirdParty/SDL/SDL3/SDL_assert.h index eb3746994..e6860ce32 100644 --- a/Source/ThirdParty/SDL/SDL3/SDL_assert.h +++ b/Source/ThirdParty/SDL/SDL3/SDL_assert.h @@ -127,10 +127,12 @@ extern "C" { */ #define SDL_TriggerBreakpoint() TriggerABreakpointInAPlatformSpecificManner -#elif defined(_MSC_VER) +#elif defined(_MSC_VER) && _MSC_VER >= 1310 /* Don't include intrin.h here because it contains C++ code */ extern void __cdecl __debugbreak(void); #define SDL_TriggerBreakpoint() __debugbreak() +#elif defined(_MSC_VER) && defined(_M_IX86) + #define SDL_TriggerBreakpoint() { _asm { int 0x03 } } #elif defined(ANDROID) #include #define SDL_TriggerBreakpoint() assert(0) diff --git a/Source/ThirdParty/SDL/SDL3/SDL_asyncio.h b/Source/ThirdParty/SDL/SDL3/SDL_asyncio.h index d8af8b6c9..ee13bf3ae 100644 --- a/Source/ThirdParty/SDL/SDL3/SDL_asyncio.h +++ b/Source/ThirdParty/SDL/SDL3/SDL_asyncio.h @@ -213,7 +213,7 @@ typedef struct SDL_AsyncIOQueue SDL_AsyncIOQueue; * \returns a pointer to the SDL_AsyncIO structure that is created or NULL on * failure; call SDL_GetError() for more information. * - * \since This function is available since SDL 3.2.0. + * \since This function is available since SDL 3.1.8. * * \sa SDL_CloseAsyncIO * \sa SDL_ReadAsyncIO @@ -234,7 +234,7 @@ extern SDL_DECLSPEC SDL_AsyncIO * SDLCALL SDL_AsyncIOFromFile(const char *file, * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.2.0. + * \since This function is available since SDL 3.1.8. */ extern SDL_DECLSPEC Sint64 SDLCALL SDL_GetAsyncIOSize(SDL_AsyncIO *asyncio); @@ -269,7 +269,7 @@ extern SDL_DECLSPEC Sint64 SDLCALL SDL_GetAsyncIOSize(SDL_AsyncIO *asyncio); * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.2.0. + * \since This function is available since SDL 3.1.8. * * \sa SDL_WriteAsyncIO * \sa SDL_CreateAsyncIOQueue @@ -306,7 +306,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_ReadAsyncIO(SDL_AsyncIO *asyncio, void *ptr * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.2.0. + * \since This function is available since SDL 3.1.8. * * \sa SDL_ReadAsyncIO * \sa SDL_CreateAsyncIOQueue @@ -358,7 +358,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_WriteAsyncIO(SDL_AsyncIO *asyncio, void *pt * \threadsafety It is safe to call this function from any thread, but two * threads should not attempt to close the same object. * - * \since This function is available since SDL 3.2.0. + * \since This function is available since SDL 3.1.8. */ extern SDL_DECLSPEC bool SDLCALL SDL_CloseAsyncIO(SDL_AsyncIO *asyncio, bool flush, SDL_AsyncIOQueue *queue, void *userdata); @@ -373,7 +373,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_CloseAsyncIO(SDL_AsyncIO *asyncio, bool flu * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.2.0. + * \since This function is available since SDL 3.1.8. * * \sa SDL_DestroyAsyncIOQueue * \sa SDL_GetAsyncIOResult @@ -407,7 +407,7 @@ extern SDL_DECLSPEC SDL_AsyncIOQueue * SDLCALL SDL_CreateAsyncIOQueue(void); * no other thread is waiting on the queue with * SDL_WaitAsyncIOResult. * - * \since This function is available since SDL 3.2.0. + * \since This function is available since SDL 3.1.8. */ extern SDL_DECLSPEC void SDLCALL SDL_DestroyAsyncIOQueue(SDL_AsyncIOQueue *queue); @@ -431,7 +431,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_DestroyAsyncIOQueue(SDL_AsyncIOQueue *queue * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.2.0. + * \since This function is available since SDL 3.1.8. * * \sa SDL_WaitAsyncIOResult */ @@ -475,7 +475,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_GetAsyncIOResult(SDL_AsyncIOQueue *queue, S * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.2.0. + * \since This function is available since SDL 3.1.8. * * \sa SDL_SignalAsyncIOQueue */ @@ -499,7 +499,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_WaitAsyncIOResult(SDL_AsyncIOQueue *queue, * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.2.0. + * \since This function is available since SDL 3.1.8. * * \sa SDL_WaitAsyncIOResult */ @@ -531,7 +531,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_SignalAsyncIOQueue(SDL_AsyncIOQueue *queue) * \returns true on success or false on failure; call SDL_GetError() for more * information. * - * \since This function is available since SDL 3.2.0. + * \since This function is available since SDL 3.1.8. * * \sa SDL_LoadFile_IO */ diff --git a/Source/ThirdParty/SDL/SDL3/SDL_audio.h b/Source/ThirdParty/SDL/SDL3/SDL_audio.h index 8cbaa98f1..fdfc376ae 100644 --- a/Source/ThirdParty/SDL/SDL3/SDL_audio.h +++ b/Source/ThirdParty/SDL/SDL3/SDL_audio.h @@ -745,7 +745,7 @@ extern SDL_DECLSPEC SDL_AudioDeviceID SDLCALL SDL_OpenAudioDevice(SDL_AudioDevic * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.2.0. + * \since This function is available since SDL 3.1.8. */ extern SDL_DECLSPEC bool SDLCALL SDL_IsAudioDevicePhysical(SDL_AudioDeviceID devid); @@ -759,7 +759,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_IsAudioDevicePhysical(SDL_AudioDeviceID dev * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.2.0. + * \since This function is available since SDL 3.1.8. */ extern SDL_DECLSPEC bool SDLCALL SDL_IsAudioDevicePlayback(SDL_AudioDeviceID devid); @@ -1577,6 +1577,26 @@ extern SDL_DECLSPEC bool SDLCALL SDL_PauseAudioStreamDevice(SDL_AudioStream *str */ extern SDL_DECLSPEC bool SDLCALL SDL_ResumeAudioStreamDevice(SDL_AudioStream *stream); +/** + * Use this function to query if an audio device associated with a stream is + * paused. + * + * Unlike in SDL2, audio devices start in an _unpaused_ state, since an app + * has to bind a stream before any audio will flow. + * + * \param stream the audio stream associated with the audio device to query. + * \returns true if device is valid and paused, false otherwise. + * + * \threadsafety It is safe to call this function from any thread. + * + * \since This function is available since SDL 3.2.0. + * + * \sa SDL_PauseAudioStreamDevice + * \sa SDL_ResumeAudioStreamDevice + */ +extern SDL_DECLSPEC bool SDLCALL SDL_AudioStreamDevicePaused(SDL_AudioStream *stream); + + /** * Lock an audio stream for serialized access. * diff --git a/Source/ThirdParty/SDL/SDL3/SDL_bits.h b/Source/ThirdParty/SDL/SDL3/SDL_bits.h index 0837f14bb..6657e6b25 100644 --- a/Source/ThirdParty/SDL/SDL3/SDL_bits.h +++ b/Source/ThirdParty/SDL/SDL3/SDL_bits.h @@ -78,7 +78,7 @@ SDL_FORCE_INLINE int SDL_MostSignificantBitIndex32(Uint32 x) return -1; } return _SDL_bsr_watcom(x); -#elif defined(_MSC_VER) +#elif defined(_MSC_VER) && _MSC_VER >= 1400 unsigned long index; if (_BitScanReverse(&index, x)) { return (int)index; diff --git a/Source/ThirdParty/SDL/SDL3/SDL_dialog.h b/Source/ThirdParty/SDL/SDL3/SDL_dialog.h index ca3162959..22cd8e376 100644 --- a/Source/ThirdParty/SDL/SDL3/SDL_dialog.h +++ b/Source/ThirdParty/SDL/SDL3/SDL_dialog.h @@ -312,7 +312,7 @@ typedef enum SDL_FileDialogType * callback may be invoked from the same thread or from a * different one, depending on the OS's constraints. * - * \since This function is available since SDL 3.2.0. + * \since This function is available since SDL 3.1.8. * * \sa SDL_FileDialogType * \sa SDL_DialogFileCallback diff --git a/Source/ThirdParty/SDL/SDL3/SDL_filesystem.h b/Source/ThirdParty/SDL/SDL3/SDL_filesystem.h index 1624113a9..c228a0382 100644 --- a/Source/ThirdParty/SDL/SDL3/SDL_filesystem.h +++ b/Source/ThirdParty/SDL/SDL3/SDL_filesystem.h @@ -484,7 +484,7 @@ extern SDL_DECLSPEC char ** SDLCALL SDL_GlobDirectory(const char *path, const ch * platform-dependent notation. NULL if there's a problem. This * should be freed with SDL_free() when it is no longer needed. * - * \since This function is available since SDL 3.2.0. + * \since This function is available since SDL 3.1.8. */ extern SDL_DECLSPEC char * SDLCALL SDL_GetCurrentDirectory(void); diff --git a/Source/ThirdParty/SDL/SDL3/SDL_gpu.h b/Source/ThirdParty/SDL/SDL3/SDL_gpu.h index b93f5761d..d4b92b9d7 100644 --- a/Source/ThirdParty/SDL/SDL3/SDL_gpu.h +++ b/Source/ThirdParty/SDL/SDL3/SDL_gpu.h @@ -2118,7 +2118,7 @@ extern SDL_DECLSPEC SDL_GPUDevice *SDLCALL SDL_CreateGPUDevice( * provide SPIR-V shaders if applicable. * - `SDL_PROP_GPU_DEVICE_CREATE_SHADERS_DXBC_BOOLEAN`: The app is able to * provide DXBC shaders if applicable - * `SDL_PROP_GPU_DEVICE_CREATE_SHADERS_DXIL_BOOLEAN`: The app is able to + * - `SDL_PROP_GPU_DEVICE_CREATE_SHADERS_DXIL_BOOLEAN`: The app is able to * provide DXIL shaders if applicable. * - `SDL_PROP_GPU_DEVICE_CREATE_SHADERS_MSL_BOOLEAN`: The app is able to * provide MSL shaders if applicable. @@ -3664,7 +3664,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_SetGPUSwapchainParameters( * \returns true if successful, false on error; call SDL_GetError() for more * information. * - * \since This function is available since SDL 3.2.0. + * \since This function is available since SDL 3.1.8. */ extern SDL_DECLSPEC bool SDLCALL SDL_SetGPUAllowedFramesInFlight( SDL_GPUDevice *device, @@ -3749,7 +3749,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_AcquireGPUSwapchainTexture( * \threadsafety This function should only be called from the thread that * created the window. * - * \since This function is available since SDL 3.2.0. + * \since This function is available since SDL 3.1.8. * * \sa SDL_AcquireGPUSwapchainTexture * \sa SDL_WaitAndAcquireGPUSwapchainTexture @@ -3792,7 +3792,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_WaitForGPUSwapchain( * \threadsafety This function should only be called from the thread that * created the window. * - * \since This function is available since SDL 3.2.0. + * \since This function is available since SDL 3.1.8. * * \sa SDL_SubmitGPUCommandBuffer * \sa SDL_SubmitGPUCommandBufferAndAcquireFence diff --git a/Source/ThirdParty/SDL/SDL3/SDL_init.h b/Source/ThirdParty/SDL/SDL3/SDL_init.h index 776c52b33..6eb21f841 100644 --- a/Source/ThirdParty/SDL/SDL3/SDL_init.h +++ b/Source/ThirdParty/SDL/SDL3/SDL_init.h @@ -313,7 +313,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_Quit(void); * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.2.0. + * \since This function is available since SDL 3.1.8. * * \sa SDL_RunOnMainThread */ @@ -350,7 +350,7 @@ typedef void (SDLCALL *SDL_MainThreadCallback)(void *userdata); * * \threadsafety It is safe to call this function from any thread. * - * \since This function is available since SDL 3.2.0. + * \since This function is available since SDL 3.1.8. * * \sa SDL_IsMainThread */ diff --git a/Source/ThirdParty/SDL/SDL3/SDL_iostream.h b/Source/ThirdParty/SDL/SDL3/SDL_iostream.h index e0456c7c2..ca2bf275b 100644 --- a/Source/ThirdParty/SDL/SDL3/SDL_iostream.h +++ b/Source/ThirdParty/SDL/SDL3/SDL_iostream.h @@ -703,7 +703,7 @@ extern SDL_DECLSPEC void * SDLCALL SDL_LoadFile(const char *file, size_t *datasi * \returns true on success or false on failure; call SDL_GetError() for more * information. * - * \since This function is available since SDL 3.2.0. + * \since This function is available since SDL 3.1.8. * * \sa SDL_SaveFile * \sa SDL_LoadFile_IO @@ -713,14 +713,14 @@ extern SDL_DECLSPEC bool SDLCALL SDL_SaveFile_IO(SDL_IOStream *src, const void * /** * Save all the data into a file path. * - * \param file the path to read all available data from. + * \param file the path to write all available data into. * \param data the data to be written. If datasize is 0, may be NULL or a * invalid pointer. * \param datasize the number of bytes to be written. * \returns true on success or false on failure; call SDL_GetError() for more * information. * - * \since This function is available since SDL 3.2.0. + * \since This function is available since SDL 3.1.8. * * \sa SDL_SaveFile_IO * \sa SDL_LoadFile diff --git a/Source/ThirdParty/SDL/SDL3/SDL_keycode.h b/Source/ThirdParty/SDL/SDL3/SDL_keycode.h index e4d6024eb..3c40e9625 100644 --- a/Source/ThirdParty/SDL/SDL3/SDL_keycode.h +++ b/Source/ThirdParty/SDL/SDL3/SDL_keycode.h @@ -47,11 +47,15 @@ * A special exception is the number keys at the top of the keyboard which map * to SDLK_0...SDLK_9 on AZERTY layouts. * + * Keys with the `SDLK_EXTENDED_MASK` bit set do not map to a scancode or + * unicode code point. + * * \since This datatype is available since SDL 3.1.3. */ typedef Uint32 SDL_Keycode; -#define SDLK_SCANCODE_MASK (1u<<30) +#define SDLK_EXTENDED_MASK (1u << 29) +#define SDLK_SCANCODE_MASK (1u << 30) #define SDL_SCANCODE_TO_KEYCODE(X) (X | SDLK_SCANCODE_MASK) #define SDLK_UNKNOWN 0x00000000u /**< 0 */ #define SDLK_RETURN 0x0000000du /**< '\r' */ @@ -302,6 +306,13 @@ typedef Uint32 SDL_Keycode; #define SDLK_SOFTRIGHT 0x40000120u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_SOFTRIGHT) */ #define SDLK_CALL 0x40000121u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_CALL) */ #define SDLK_ENDCALL 0x40000122u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_ENDCALL) */ +#define SDLK_LEFT_TAB 0x20000001u /**< Extended key Left Tab */ +#define SDLK_LEVEL5_SHIFT 0x20000002u /**< Extended key Level 5 Shift */ +#define SDLK_MULTI_KEY_COMPOSE 0x20000003u /**< Extended key Multi-key Compose */ +#define SDLK_LMETA 0x20000004u /**< Extended key Left Meta */ +#define SDLK_RMETA 0x20000005u /**< Extended key Right Meta */ +#define SDLK_LHYPER 0x20000006u /**< Extended key Left Hyper */ +#define SDLK_RHYPER 0x20000007u /**< Extended key Right Hyper */ /** * Valid key modifiers (possibly OR'd together). @@ -313,6 +324,7 @@ typedef Uint16 SDL_Keymod; #define SDL_KMOD_NONE 0x0000u /**< no modifier is applicable. */ #define SDL_KMOD_LSHIFT 0x0001u /**< the left Shift key is down. */ #define SDL_KMOD_RSHIFT 0x0002u /**< the right Shift key is down. */ +#define SDL_KMOD_LEVEL5 0x0004u /**< the Level 5 Shift key is down. */ #define SDL_KMOD_LCTRL 0x0040u /**< the left Ctrl (Control) key is down. */ #define SDL_KMOD_RCTRL 0x0080u /**< the right Ctrl (Control) key is down. */ #define SDL_KMOD_LALT 0x0100u /**< the left Alt key is down. */ diff --git a/Source/ThirdParty/SDL/SDL3/SDL_platform_defines.h b/Source/ThirdParty/SDL/SDL3/SDL_platform_defines.h index 680fb7b7a..59710a5ea 100644 --- a/Source/ThirdParty/SDL/SDL3/SDL_platform_defines.h +++ b/Source/ThirdParty/SDL/SDL3/SDL_platform_defines.h @@ -366,7 +366,7 @@ */ #define SDL_WINAPI_FAMILY_PHONE (WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP) -#elif HAVE_WINAPIFAMILY_H && HAVE_WINAPIFAMILY_H +#elif defined(HAVE_WINAPIFAMILY_H) && HAVE_WINAPIFAMILY_H #define SDL_WINAPI_FAMILY_PHONE (WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP) #else #define SDL_WINAPI_FAMILY_PHONE 0 diff --git a/Source/ThirdParty/SDL/SDL3/SDL_render.h b/Source/ThirdParty/SDL/SDL3/SDL_render.h index c69153634..d7428b075 100644 --- a/Source/ThirdParty/SDL/SDL3/SDL_render.h +++ b/Source/ThirdParty/SDL/SDL3/SDL_render.h @@ -2110,7 +2110,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_RenderTextureRotated(SDL_Renderer *renderer * * \threadsafety You may only call this function from the main thread. * - * \since This function is available since SDL 3.2.0. + * \since This function is available since SDL 3.1.8. * * \sa SDL_RenderTexture */ @@ -2568,7 +2568,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_RenderDebugText(SDL_Renderer *renderer, flo * * \threadsafety This function should only be called on the main thread. * - * \since This function is available since SDL 3.2.0. + * \since This function is available since SDL 3.1.8. * * \sa SDL_RenderDebugText * \sa SDL_DEBUG_TEXT_FONT_CHARACTER_SIZE diff --git a/Source/ThirdParty/SDL/SDL3/SDL_revision.h b/Source/ThirdParty/SDL/SDL3/SDL_revision.h index 45170fc93..abc6ed0dd 100644 --- a/Source/ThirdParty/SDL/SDL3/SDL_revision.h +++ b/Source/ThirdParty/SDL/SDL3/SDL_revision.h @@ -31,9 +31,9 @@ /* #undef SDL_VENDOR_INFO */ #ifdef SDL_VENDOR_INFO -#define SDL_REVISION "SDL3-3.1.7-preview-3.1.6-637-g8ec576ddab (" SDL_VENDOR_INFO ")" +#define SDL_REVISION "SDL3-3.1.9-preview-3.1.8-43-g82125ec1d (" SDL_VENDOR_INFO ")" #else -#define SDL_REVISION "SDL3-3.1.7-preview-3.1.6-637-g8ec576ddab" +#define SDL_REVISION "SDL3-3.1.9-preview-3.1.8-43-g82125ec1d" #endif #endif /* SDL_revision_h_ */ diff --git a/Source/ThirdParty/SDL/SDL3/SDL_stdinc.h b/Source/ThirdParty/SDL/SDL3/SDL_stdinc.h index cd172c425..c77cedc46 100644 --- a/Source/ThirdParty/SDL/SDL3/SDL_stdinc.h +++ b/Source/ThirdParty/SDL/SDL3/SDL_stdinc.h @@ -107,6 +107,32 @@ void *alloca(size_t); # endif #endif + +#ifdef SDL_WIKI_DOCUMENTATION_SECTION + +/** + * Don't let SDL use "long long" C types. + * + * SDL will define this if it believes the compiler doesn't understand the + * "long long" syntax for C datatypes. This can happen on older compilers. + * + * If _your_ compiler doesn't support "long long" but SDL doesn't know it, it + * is safe to define this yourself to build against the SDL headers. + * + * If this is defined, it will remove access to some C runtime support + * functions, like SDL_ulltoa and SDL_strtoll that refer to this datatype + * explicitly. The rest of SDL will still be available. + * + * SDL's own source code cannot be built with a compiler that has this + * defined, for various technical reasons. + */ +#define SDL_NOLONGLONG 1 + +#elif defined(_MSC_VER) && (_MSC_VER < 1310) /* long long introduced in Visual Studio.NET 2003 */ +# define SDL_NOLONGLONG 1 +#endif + + #ifdef SDL_WIKI_DOCUMENTATION_SECTION /** @@ -753,7 +779,9 @@ typedef Sint64 SDL_Time; #endif /* Specifically for the `long long` -- SDL-specific. */ #ifdef SDL_PLATFORM_WINDOWS +#ifndef SDL_NOLONGLONG SDL_COMPILE_TIME_ASSERT(longlong_size64, sizeof(long long) == 8); /* using I64 for windows - make sure `long long` is 64 bits. */ +#endif #define SDL_PRILL_PREFIX "I64" #else #define SDL_PRILL_PREFIX "ll" @@ -1126,8 +1154,10 @@ SDL_COMPILE_TIME_ASSERT(uint32_size, sizeof(Uint32) == 4); SDL_COMPILE_TIME_ASSERT(sint32_size, sizeof(Sint32) == 4); SDL_COMPILE_TIME_ASSERT(uint64_size, sizeof(Uint64) == 8); SDL_COMPILE_TIME_ASSERT(sint64_size, sizeof(Sint64) == 8); +#ifndef SDL_NOLONGLONG SDL_COMPILE_TIME_ASSERT(uint64_longlong, sizeof(Uint64) <= sizeof(unsigned long long)); SDL_COMPILE_TIME_ASSERT(size_t_longlong, sizeof(size_t) <= sizeof(unsigned long long)); +#endif typedef struct SDL_alignment_test { Uint8 a; @@ -3492,6 +3522,8 @@ extern SDL_DECLSPEC char * SDLCALL SDL_ltoa(long value, char *str, int radix); */ extern SDL_DECLSPEC char * SDLCALL SDL_ultoa(unsigned long value, char *str, int radix); +#ifndef SDL_NOLONGLONG + /** * Convert a long long integer into a string. * @@ -3547,6 +3579,7 @@ extern SDL_DECLSPEC char * SDLCALL SDL_lltoa(long long value, char *str, int rad * \sa SDL_ultoa */ extern SDL_DECLSPEC char * SDLCALL SDL_ulltoa(unsigned long long value, char *str, int radix); +#endif /** * Parse an `int` from a string. @@ -3660,6 +3693,8 @@ extern SDL_DECLSPEC long SDLCALL SDL_strtol(const char *str, char **endp, int ba */ extern SDL_DECLSPEC unsigned long SDLCALL SDL_strtoul(const char *str, char **endp, int base); +#ifndef SDL_NOLONGLONG + /** * Parse a `long long` from a string. * @@ -3726,6 +3761,7 @@ extern SDL_DECLSPEC long long SDLCALL SDL_strtoll(const char *str, char **endp, * \sa SDL_ulltoa */ extern SDL_DECLSPEC unsigned long long SDLCALL SDL_strtoull(const char *str, char **endp, int base); +#endif /** * Parse a `double` from a string. diff --git a/Source/ThirdParty/SDL/SDL3/SDL_storage.h b/Source/ThirdParty/SDL/SDL3/SDL_storage.h index ea5933d57..e5ef689f1 100644 --- a/Source/ThirdParty/SDL/SDL3/SDL_storage.h +++ b/Source/ThirdParty/SDL/SDL3/SDL_storage.h @@ -47,7 +47,7 @@ * * Consider the following example: * - * ``` + * ```c * void ReadGameData(void) * { * extern char** fileNames; @@ -115,7 +115,7 @@ * When using, SDL_Storage, these types of problems are virtually impossible * to trip over: * - * ``` + * ```c * void ReadGameData(void) * { * extern char** fileNames; diff --git a/Source/ThirdParty/SDL/SDL3/SDL_thread.h b/Source/ThirdParty/SDL/SDL3/SDL_thread.h index c729c5282..d7d83edb5 100644 --- a/Source/ThirdParty/SDL/SDL3/SDL_thread.h +++ b/Source/ThirdParty/SDL/SDL3/SDL_thread.h @@ -446,7 +446,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_WaitThread(SDL_Thread *thread, int *status) * \returns the current state of a thread, or SDL_THREAD_UNKNOWN if the thread * isn't valid. * - * \since This function is available since SDL 3.2.0. + * \since This function is available since SDL 3.1.8. * * \sa SDL_ThreadState */ diff --git a/Source/ThirdParty/SDL/SDL3/SDL_tray.h b/Source/ThirdParty/SDL/SDL3/SDL_tray.h index 77f3d0836..9830b966c 100644 --- a/Source/ThirdParty/SDL/SDL3/SDL_tray.h +++ b/Source/ThirdParty/SDL/SDL3/SDL_tray.h @@ -106,7 +106,7 @@ typedef void (SDLCALL *SDL_TrayCallback)(void *userdata, SDL_TrayEntry *entry); * UTF-8 encoding. Not supported on all platforms. May be NULL. * \returns The newly created system tray icon. * - * \since This function is available since SDL 3.2.0. + * \since This function is available since SDL 3.1.8. * * \sa SDL_CreateTrayMenu * \sa SDL_GetTrayMenu @@ -120,7 +120,7 @@ extern SDL_DECLSPEC SDL_Tray *SDLCALL SDL_CreateTray(SDL_Surface *icon, const ch * \param tray the tray icon to be updated. * \param icon the new icon. May be NULL. * - * \since This function is available since SDL 3.2.0. + * \since This function is available since SDL 3.1.8. * * \sa SDL_CreateTray */ @@ -132,7 +132,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_SetTrayIcon(SDL_Tray *tray, SDL_Surface *ic * \param tray the tray icon to be updated. * \param tooltip the new tooltip in UTF-8 encoding. May be NULL. * - * \since This function is available since SDL 3.2.0. + * \since This function is available since SDL 3.1.8. * * \sa SDL_CreateTray */ @@ -151,7 +151,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_SetTrayTooltip(SDL_Tray *tray, const char * * \param tray the tray to bind the menu to. * \returns the newly created menu. * - * \since This function is available since SDL 3.2.0. + * \since This function is available since SDL 3.1.8. * * \sa SDL_CreateTray * \sa SDL_GetTrayMenu @@ -172,7 +172,7 @@ extern SDL_DECLSPEC SDL_TrayMenu *SDLCALL SDL_CreateTrayMenu(SDL_Tray *tray); * \param entry the tray entry to bind the menu to. * \returns the newly created menu. * - * \since This function is available since SDL 3.2.0. + * \since This function is available since SDL 3.1.8. * * \sa SDL_InsertTrayEntryAt * \sa SDL_GetTraySubmenu @@ -194,7 +194,7 @@ extern SDL_DECLSPEC SDL_TrayMenu *SDLCALL SDL_CreateTraySubmenu(SDL_TrayEntry *e * \param tray the tray entry to bind the menu to. * \returns the newly created menu. * - * \since This function is available since SDL 3.2.0. + * \since This function is available since SDL 3.1.8. * * \sa SDL_CreateTray * \sa SDL_CreateTrayMenu @@ -215,7 +215,7 @@ extern SDL_DECLSPEC SDL_TrayMenu *SDLCALL SDL_GetTrayMenu(SDL_Tray *tray); * \param entry the tray entry to bind the menu to. * \returns the newly created menu. * - * \since This function is available since SDL 3.2.0. + * \since This function is available since SDL 3.1.8. * * \sa SDL_InsertTrayEntryAt * \sa SDL_CreateTraySubmenu @@ -232,7 +232,7 @@ extern SDL_DECLSPEC SDL_TrayMenu *SDLCALL SDL_GetTraySubmenu(SDL_TrayEntry *entr * pointer becomes invalid when any function that inserts or deletes * entries in the menu is called. * - * \since This function is available since SDL 3.2.0. + * \since This function is available since SDL 3.1.8. * * \sa SDL_RemoveTrayEntry * \sa SDL_InsertTrayEntryAt @@ -244,7 +244,7 @@ extern SDL_DECLSPEC const SDL_TrayEntry **SDLCALL SDL_GetTrayEntries(SDL_TrayMen * * \param entry The entry to be deleted. * - * \since This function is available since SDL 3.2.0. + * \since This function is available since SDL 3.1.8. * * \sa SDL_GetTrayEntries * \sa SDL_InsertTrayEntryAt @@ -267,7 +267,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_RemoveTrayEntry(SDL_TrayEntry *entry); * \param flags a combination of flags, some of which are mandatory. * \returns the newly created entry, or NULL if pos is out of bounds. * - * \since This function is available since SDL 3.2.0. + * \since This function is available since SDL 3.1.8. * * \sa SDL_TrayEntryFlags * \sa SDL_GetTrayEntries @@ -287,7 +287,7 @@ extern SDL_DECLSPEC SDL_TrayEntry *SDLCALL SDL_InsertTrayEntryAt(SDL_TrayMenu *m * \param entry the entry to be updated. * \param label the new label for the entry in UTF-8 encoding. * - * \since This function is available since SDL 3.2.0. + * \since This function is available since SDL 3.1.8. * * \sa SDL_GetTrayEntries * \sa SDL_InsertTrayEntryAt @@ -303,7 +303,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_SetTrayEntryLabel(SDL_TrayEntry *entry, con * \param entry the entry to be read. * \returns the label of the entry in UTF-8 encoding. * - * \since This function is available since SDL 3.2.0. + * \since This function is available since SDL 3.1.8. * * \sa SDL_GetTrayEntries * \sa SDL_InsertTrayEntryAt @@ -320,7 +320,7 @@ extern SDL_DECLSPEC const char *SDLCALL SDL_GetTrayEntryLabel(SDL_TrayEntry *ent * \param checked SDL_TRUE if the entry should be checked; SDL_FALSE * otherwise. * - * \since This function is available since SDL 3.2.0. + * \since This function is available since SDL 3.1.8. * * \sa SDL_GetTrayEntries * \sa SDL_InsertTrayEntryAt @@ -336,7 +336,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_SetTrayEntryChecked(SDL_TrayEntry *entry, b * \param entry the entry to be read. * \returns SDL_TRUE if the entry is checked; SDL_FALSE otherwise. * - * \since This function is available since SDL 3.2.0. + * \since This function is available since SDL 3.1.8. * * \sa SDL_GetTrayEntries * \sa SDL_InsertTrayEntryAt @@ -351,7 +351,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_GetTrayEntryChecked(SDL_TrayEntry *entry); * \param enabled SDL_TRUE if the entry should be enabled; SDL_FALSE * otherwise. * - * \since This function is available since SDL 3.2.0. + * \since This function is available since SDL 3.1.8. * * \sa SDL_GetTrayEntries * \sa SDL_InsertTrayEntryAt @@ -365,7 +365,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_SetTrayEntryEnabled(SDL_TrayEntry *entry, b * \param entry the entry to be read. * \returns SDL_TRUE if the entry is enabled; SDL_FALSE otherwise. * - * \since This function is available since SDL 3.2.0. + * \since This function is available since SDL 3.1.8. * * \sa SDL_GetTrayEntries * \sa SDL_InsertTrayEntryAt @@ -381,13 +381,22 @@ extern SDL_DECLSPEC bool SDLCALL SDL_GetTrayEntryEnabled(SDL_TrayEntry *entry); * \param userdata an optional pointer to pass extra data to the callback when * it will be invoked. * - * \since This function is available since SDL 3.2.0. + * \since This function is available since SDL 3.1.8. * * \sa SDL_GetTrayEntries * \sa SDL_InsertTrayEntryAt */ extern SDL_DECLSPEC void SDLCALL SDL_SetTrayEntryCallback(SDL_TrayEntry *entry, SDL_TrayCallback callback, void *userdata); +/** + * Simulate a click on a tray entry. + * + * \param entry The entry to activate. + * + * \since This function is available since SDL 3.2.0. + */ +extern SDL_DECLSPEC void SDLCALL SDL_ClickTrayEntry(SDL_TrayEntry *entry); + /** * Destroys a tray object. * @@ -395,7 +404,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_SetTrayEntryCallback(SDL_TrayEntry *entry, * * \param tray the tray icon to be destroyed. * - * \since This function is available since SDL 3.2.0. + * \since This function is available since SDL 3.1.8. * * \sa SDL_CreateTray */ @@ -407,7 +416,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_DestroyTray(SDL_Tray *tray); * \param entry the entry for which to get the parent menu. * \returns the parent menu. * - * \since This function is available since SDL 3.2.0. + * \since This function is available since SDL 3.1.8. * * \sa SDL_InsertTrayEntryAt */ @@ -423,7 +432,7 @@ extern SDL_DECLSPEC SDL_TrayMenu *SDLCALL SDL_GetTrayEntryParent(SDL_TrayEntry * * \param menu the menu for which to get the parent entry. * \returns the parent entry, or NULL if this menu is not a submenu. * - * \since This function is available since SDL 3.2.0. + * \since This function is available since SDL 3.1.8. * * \sa SDL_CreateTraySubmenu * \sa SDL_GetTrayMenuParentTray @@ -440,7 +449,7 @@ extern SDL_DECLSPEC SDL_TrayEntry *SDLCALL SDL_GetTrayMenuParentEntry(SDL_TrayMe * \param menu the menu for which to get the parent enttrayry. * \returns the parent tray, or NULL if this menu is a submenu. * - * \since This function is available since SDL 3.2.0. + * \since This function is available since SDL 3.1.8. * * \sa SDL_CreateTrayMenu * \sa SDL_GetTrayMenuParentEntry diff --git a/Source/ThirdParty/SDL/SDL3/SDL_version.h b/Source/ThirdParty/SDL/SDL3/SDL_version.h index 9160fa085..692d49399 100644 --- a/Source/ThirdParty/SDL/SDL3/SDL_version.h +++ b/Source/ThirdParty/SDL/SDL3/SDL_version.h @@ -62,7 +62,7 @@ extern "C" { * * \since This macro is available since SDL 3.1.3. */ -#define SDL_MICRO_VERSION 7 +#define SDL_MICRO_VERSION 9 /** * This macro turns the version numbers into a numeric value. diff --git a/Source/Tools/Flax.Build/Deps/Dependencies/SDL.cs b/Source/Tools/Flax.Build/Deps/Dependencies/SDL.cs index 9b7eb5a80..08855e92a 100644 --- a/Source/Tools/Flax.Build/Deps/Dependencies/SDL.cs +++ b/Source/Tools/Flax.Build/Deps/Dependencies/SDL.cs @@ -88,8 +88,8 @@ namespace Flax.Deps.Dependencies Path.Combine(root, "include", "SDL3"), }; - //CloneGitRepoFastSince(root, "https://github.com/libsdl-org/SDL", new DateTime(2025, 01, 06)); - //GitResetToCommit(root, "8ec576ddabdc7edfd68e7a8a3214e84e4026328d"); + CloneGitRepoFastSince(root, "https://github.com/libsdl-org/SDL", new DateTime(2025, 01, 10)); + GitResetToCommit(root, "82125ec1d888e95f838b3cd683dfc8aa54013371"); foreach (var platform in options.Platforms) {