From 3190c2229562ee210a44eb4a0359639b94038f2f Mon Sep 17 00:00:00 2001 From: Ari Vuollet Date: Mon, 30 Dec 2024 01:57:53 +0200 Subject: [PATCH] Update SDL3 --- Source/ThirdParty/SDL/SDL3/SDL_dialog.h | 4 ++++ Source/ThirdParty/SDL/SDL3/SDL_revision.h | 4 ++-- Source/ThirdParty/SDL/SDL3/SDL_stdinc.h | 5 +++++ Source/ThirdParty/SDL/SDL3/SDL_tray.h | 14 +++++++------- Source/Tools/Flax.Build/Deps/Dependencies/SDL.cs | 4 ++-- 5 files changed, 20 insertions(+), 11 deletions(-) diff --git a/Source/ThirdParty/SDL/SDL3/SDL_dialog.h b/Source/ThirdParty/SDL/SDL3/SDL_dialog.h index 9d66573f6..23cb17cb2 100644 --- a/Source/ThirdParty/SDL/SDL3/SDL_dialog.h +++ b/Source/ThirdParty/SDL/SDL3/SDL_dialog.h @@ -94,6 +94,10 @@ typedef struct SDL_DialogFileFilter * no filter was selected or if the platform or method doesn't support * fetching the selected filter. * + * In Android, the `filelist` are `content://` URIs. They should be opened + * using SDL_IOFromFile() with appropriate modes. This applies both to open + * and save file dialog. + * * \param userdata an app-provided pointer, for the callback's use. * \param filelist the file(s) chosen by the user. * \param filter index of the selected filter. diff --git a/Source/ThirdParty/SDL/SDL3/SDL_revision.h b/Source/ThirdParty/SDL/SDL3/SDL_revision.h index 345b5377f..b111d1bd3 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-496-g5acd7fe208 (" SDL_VENDOR_INFO ")" +#define SDL_REVISION "SDL3-3.1.7-preview-3.1.6-509-g8cc4735d74 (" SDL_VENDOR_INFO ")" #else -#define SDL_REVISION "SDL3-3.1.7-preview-3.1.6-496-g5acd7fe208" +#define SDL_REVISION "SDL3-3.1.7-preview-3.1.6-509-g8cc4735d74" #endif #endif /* SDL_revision_h_ */ diff --git a/Source/ThirdParty/SDL/SDL3/SDL_stdinc.h b/Source/ThirdParty/SDL/SDL3/SDL_stdinc.h index 4a9c525a8..b828e1db2 100644 --- a/Source/ThirdParty/SDL/SDL3/SDL_stdinc.h +++ b/Source/ThirdParty/SDL/SDL3/SDL_stdinc.h @@ -45,6 +45,11 @@ #endif #ifndef __cplusplus +#if defined(__has_include) && !defined(SDL_INCLUDE_STDBOOL_H) +#if __has_include() +#define SDL_INCLUDE_STDBOOL_H +#endif +#endif #if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || \ (defined(_MSC_VER) && (_MSC_VER >= 1910 /* Visual Studio 2017 */)) || \ defined(SDL_INCLUDE_STDBOOL_H) diff --git a/Source/ThirdParty/SDL/SDL3/SDL_tray.h b/Source/ThirdParty/SDL/SDL3/SDL_tray.h index 8e81a0c38..9b31aad78 100644 --- a/Source/ThirdParty/SDL/SDL3/SDL_tray.h +++ b/Source/ThirdParty/SDL/SDL3/SDL_tray.h @@ -102,8 +102,8 @@ typedef void (SDLCALL *SDL_TrayCallback)(void *userdata, SDL_TrayEntry *entry); * Using tray icons require the video subsystem. * * \param icon a surface to be used as icon. May be NULL. - * \param tooltip a tooltip to be displayed when the mouse hovers the icon. - * Not supported on all platforms. May be NULL. + * \param tooltip a tooltip to be displayed when the mouse hovers the icon in + * 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. @@ -130,7 +130,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_SetTrayIcon(SDL_Tray *tray, SDL_Surface *ic * Updates the system tray icon's tooltip. * * \param tray the tray icon to be updated. - * \param tooltip the new tooltip. May be NULL. + * \param tooltip the new tooltip in UTF-8 encoding. May be NULL. * * \since This function is available since SDL 3.2.0. * @@ -262,8 +262,8 @@ extern SDL_DECLSPEC void SDLCALL SDL_RemoveTrayEntry(SDL_TrayEntry *entry); * \param menu the menu to append the entry to. * \param pos the desired position for the new entry. Entries at or following * this place will be moved. If pos is -1, the entry is appended. - * \param label the text to be displayed on the entry, or NULL for a - * separator. + * \param label the text to be displayed on the entry, in UTF-8 encoding, or + * NULL for a separator. * \param flags a combination of flags, some of which are mandatory. * \returns the newly created entry, or NULL if pos is out of bounds. * @@ -285,7 +285,7 @@ extern SDL_DECLSPEC SDL_TrayEntry *SDLCALL SDL_InsertTrayEntryAt(SDL_TrayMenu *m * label. The function will silently fail if that happens. * * \param entry the entry to be updated. - * \param label the new label for the entry. + * \param label the new label for the entry in UTF-8 encoding. * * \since This function is available since SDL 3.2.0. * @@ -301,7 +301,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_SetTrayEntryLabel(SDL_TrayEntry *entry, con * If the returned value is NULL, the entry is a separator. * * \param entry the entry to be read. - * \returns the label of the entry. + * \returns the label of the entry in UTF-8 encoding. * * \since This function is available since SDL 3.2.0. * diff --git a/Source/Tools/Flax.Build/Deps/Dependencies/SDL.cs b/Source/Tools/Flax.Build/Deps/Dependencies/SDL.cs index b039b0b87..7b1d435cb 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.git", new DateTime(2024, 12, 27)); - GitResetToCommit(root, "5acd7fe208d332a6a546be65042dc3112dd84cac"); + CloneGitRepoFastSince(root, "https://github.com/libsdl-org/SDL.git", new DateTime(2024, 12, 29)); + GitResetToCommit(root, "8cc4735d74a1ce89c5fceb48b021872c8c563174"); foreach (var platform in options.Platforms) {