From 454e23e98fb41b5c90b5422819b92a02285bc780 Mon Sep 17 00:00:00 2001 From: Dan Balasescu Date: Wed, 13 Aug 2025 16:49:29 +0900 Subject: [PATCH 1/4] Update submodules --- External/SDL | 2 +- External/SDL_image | 2 +- External/SDL_mixer | 2 +- External/SDL_ttf | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/External/SDL b/External/SDL index ae5ce258..29cff6e2 160000 --- a/External/SDL +++ b/External/SDL @@ -1 +1 @@ -Subproject commit ae5ce258cf4fdcfdd8533b22adc16f139e8f72a8 +Subproject commit 29cff6e2645cd7d637c502af11a9e3cf8063ccdf diff --git a/External/SDL_image b/External/SDL_image index dce0d252..90e8ee77 160000 --- a/External/SDL_image +++ b/External/SDL_image @@ -1 +1 @@ -Subproject commit dce0d252ed2cb6d74a53a2fb9642891c30e58653 +Subproject commit 90e8ee775595fee870325fc11b8e0291d84a8a6b diff --git a/External/SDL_mixer b/External/SDL_mixer index 60e2959e..f9566f4d 160000 --- a/External/SDL_mixer +++ b/External/SDL_mixer @@ -1 +1 @@ -Subproject commit 60e2959e7310f8821757a03dee155d8d7716994b +Subproject commit f9566f4dd643cd5dd6e136e4779fe49fa8c4e3d7 diff --git a/External/SDL_ttf b/External/SDL_ttf index a9b5a19b..67eced52 160000 --- a/External/SDL_ttf +++ b/External/SDL_ttf @@ -1 +1 @@ -Subproject commit a9b5a19b83f89376be52c99a9f654c314d99761b +Subproject commit 67eced52533771474d38e38c348eba7c1fc2bbea From 5a16446ded8d04467d584eb390ffd5000d614a6a Mon Sep 17 00:00:00 2001 From: Dan Balasescu Date: Wed, 13 Aug 2025 16:52:34 +0900 Subject: [PATCH 2/4] Regenerate bindings --- SDL3-CS/SDL3/ClangSharp/SDL_tray.g.cs | 4 - .../SDL3_image/ClangSharp/SDL_image.g.cs | 149 +++++++++++++++--- SDL3_ttf-CS/SDL3_ttf/ClangSharp/SDL_ttf.g.cs | 7 + 3 files changed, 130 insertions(+), 30 deletions(-) diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_tray.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_tray.g.cs index e15e7296..d6017d5d 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_tray.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_tray.g.cs @@ -42,10 +42,6 @@ public partial struct SDL_TrayEntry public static unsafe partial class SDL3 { - [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - [return: NativeTypeName("bool")] - public static extern SDLBool SDL_IsTraySupported(); - [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern SDL_Tray* SDL_CreateTray(SDL_Surface* icon, [NativeTypeName("const char *")] byte* tooltip); diff --git a/SDL3_image-CS/SDL3_image/ClangSharp/SDL_image.g.cs b/SDL3_image-CS/SDL3_image/ClangSharp/SDL_image.g.cs index 8f334572..1e2ba414 100644 --- a/SDL3_image-CS/SDL3_image/ClangSharp/SDL_image.g.cs +++ b/SDL3_image-CS/SDL3_image/ClangSharp/SDL_image.g.cs @@ -41,7 +41,11 @@ public unsafe partial struct IMG_Animation public int* delays; } - public partial struct IMG_AnimationStream + public partial struct IMG_AnimationEncoder + { + } + + public partial struct IMG_AnimationDecoder { } @@ -206,6 +210,14 @@ public static unsafe partial class SDL3_image [DllImport("SDL3_image", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern SDL_Surface* IMG_ReadXPMFromArrayToRGB888([NativeTypeName("char **")] byte** xpm); + [DllImport("SDL3_image", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] + [return: NativeTypeName("bool")] + public static extern SDLBool IMG_Save(SDL_Surface* surface, [NativeTypeName("const char *")] byte* file); + + [DllImport("SDL3_image", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] + [return: NativeTypeName("bool")] + public static extern SDLBool IMG_SaveTyped_IO(SDL_Surface* surface, SDL_IOStream* dst, [NativeTypeName("bool")] SDLBool closeio, [NativeTypeName("const char *")] byte* type); + [DllImport("SDL3_image", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] public static extern SDLBool IMG_SaveAVIF(SDL_Surface* surface, [NativeTypeName("const char *")] byte* file, int quality); @@ -216,11 +228,19 @@ public static unsafe partial class SDL3_image [DllImport("SDL3_image", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern SDLBool IMG_SavePNG(SDL_Surface* surface, [NativeTypeName("const char *")] byte* file); + public static extern SDLBool IMG_SaveBMP(SDL_Surface* surface, [NativeTypeName("const char *")] byte* file); [DllImport("SDL3_image", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern SDLBool IMG_SavePNG_IO(SDL_Surface* surface, SDL_IOStream* dst, [NativeTypeName("bool")] SDLBool closeio); + public static extern SDLBool IMG_SaveBMP_IO(SDL_Surface* surface, SDL_IOStream* dst, [NativeTypeName("bool")] SDLBool closeio); + + [DllImport("SDL3_image", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] + [return: NativeTypeName("bool")] + public static extern SDLBool IMG_SaveGIF(SDL_Surface* surface, [NativeTypeName("const char *")] byte* file); + + [DllImport("SDL3_image", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] + [return: NativeTypeName("bool")] + public static extern SDLBool IMG_SaveGIF_IO(SDL_Surface* surface, SDL_IOStream* dst, [NativeTypeName("bool")] SDLBool closeio); [DllImport("SDL3_image", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] @@ -232,19 +252,27 @@ public static unsafe partial class SDL3_image [DllImport("SDL3_image", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern SDLBool IMG_SaveWEBP_IO(SDL_Surface* surface, SDL_IOStream* dst, [NativeTypeName("bool")] SDLBool closeio, float quality); + public static extern SDLBool IMG_SavePNG(SDL_Surface* surface, [NativeTypeName("const char *")] byte* file); [DllImport("SDL3_image", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern SDLBool IMG_SaveWEBP(SDL_Surface* surface, [NativeTypeName("const char *")] byte* file, float quality); + public static extern SDLBool IMG_SavePNG_IO(SDL_Surface* surface, SDL_IOStream* dst, [NativeTypeName("bool")] SDLBool closeio); [DllImport("SDL3_image", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern SDLBool IMG_SaveTGA_IO(SDL_Surface* surface, SDL_IOStream* dst); + public static extern SDLBool IMG_SaveTGA(SDL_Surface* surface, [NativeTypeName("const char *")] byte* file); [DllImport("SDL3_image", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern SDLBool IMG_SaveTGA(SDL_Surface* surface, [NativeTypeName("const char *")] byte* file); + public static extern SDLBool IMG_SaveTGA_IO(SDL_Surface* surface, SDL_IOStream* dst, [NativeTypeName("bool")] SDLBool closeio); + + [DllImport("SDL3_image", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] + [return: NativeTypeName("bool")] + public static extern SDLBool IMG_SaveWEBP(SDL_Surface* surface, [NativeTypeName("const char *")] byte* file, float quality); + + [DllImport("SDL3_image", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] + [return: NativeTypeName("bool")] + public static extern SDLBool IMG_SaveWEBP_IO(SDL_Surface* surface, SDL_IOStream* dst, [NativeTypeName("bool")] SDLBool closeio, float quality); [DllImport("SDL3_image", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern IMG_Animation* IMG_LoadAnimation([NativeTypeName("const char *")] byte* file); @@ -258,6 +286,12 @@ public static unsafe partial class SDL3_image [DllImport("SDL3_image", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern void IMG_FreeAnimation(IMG_Animation* anim); + [DllImport("SDL3_image", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] + public static extern IMG_Animation* IMG_LoadAPNGAnimation_IO(SDL_IOStream* src); + + [DllImport("SDL3_image", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] + public static extern IMG_Animation* IMG_LoadAVIFAnimation_IO(SDL_IOStream* src); + [DllImport("SDL3_image", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern IMG_Animation* IMG_LoadGIFAnimation_IO(SDL_IOStream* src); @@ -265,21 +299,45 @@ public static unsafe partial class SDL3_image public static extern IMG_Animation* IMG_LoadWEBPAnimation_IO(SDL_IOStream* src); [DllImport("SDL3_image", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern IMG_AnimationStream* IMG_CreateAnimationStream([NativeTypeName("const char *")] byte* file); + public static extern IMG_AnimationEncoder* IMG_CreateAnimationEncoder([NativeTypeName("const char *")] byte* file); + + [DllImport("SDL3_image", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] + public static extern IMG_AnimationEncoder* IMG_CreateAnimationEncoder_IO(SDL_IOStream* dst, [NativeTypeName("bool")] SDLBool closeio, [NativeTypeName("const char *")] byte* type); + + [DllImport("SDL3_image", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] + public static extern IMG_AnimationEncoder* IMG_CreateAnimationEncoderWithProperties(SDL_PropertiesID props); + + [DllImport("SDL3_image", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] + [return: NativeTypeName("bool")] + public static extern SDLBool IMG_AddAnimationEncoderFrame(IMG_AnimationEncoder* encoder, SDL_Surface* surface, [NativeTypeName("Uint64")] ulong pts); + + [DllImport("SDL3_image", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] + [return: NativeTypeName("bool")] + public static extern SDLBool IMG_CloseAnimationEncoder(IMG_AnimationEncoder* encoder); + + [DllImport("SDL3_image", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] + public static extern IMG_AnimationDecoder* IMG_CreateAnimationDecoder([NativeTypeName("const char *")] byte* file); + + [DllImport("SDL3_image", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] + public static extern IMG_AnimationDecoder* IMG_CreateAnimationDecoder_IO(SDL_IOStream* src, [NativeTypeName("bool")] SDLBool closeio, [NativeTypeName("const char *")] byte* type); [DllImport("SDL3_image", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern IMG_AnimationStream* IMG_CreateAnimationStream_IO(SDL_IOStream* dst, [NativeTypeName("bool")] SDLBool closeio, [NativeTypeName("const char *")] byte* type); + public static extern IMG_AnimationDecoder* IMG_CreateAnimationDecoderWithProperties(SDL_PropertiesID props); [DllImport("SDL3_image", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern IMG_AnimationStream* IMG_CreateAnimationStreamWithProperties(SDL_PropertiesID props); + public static extern SDL_PropertiesID IMG_GetAnimationDecoderProperties(IMG_AnimationDecoder* decoder); [DllImport("SDL3_image", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern SDLBool IMG_AddAnimationFrame(IMG_AnimationStream* stream, SDL_Surface* surface, [NativeTypeName("Uint64")] ulong pts); + public static extern SDLBool IMG_GetAnimationDecoderFrame(IMG_AnimationDecoder* decoder, SDL_Surface** frame, [NativeTypeName("Uint64 *")] ulong* pts); [DllImport("SDL3_image", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern SDLBool IMG_CloseAnimationStream(IMG_AnimationStream* stream); + public static extern SDLBool IMG_ResetAnimationDecoder(IMG_AnimationDecoder* decoder); + + [DllImport("SDL3_image", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] + [return: NativeTypeName("bool")] + public static extern SDLBool IMG_CloseAnimationDecoder(IMG_AnimationDecoder* decoder); [NativeTypeName("#define SDL_IMAGE_MAJOR_VERSION 3")] public const int SDL_IMAGE_MAJOR_VERSION = 3; @@ -293,25 +351,64 @@ public static unsafe partial class SDL3_image [NativeTypeName("#define SDL_IMAGE_VERSION SDL_VERSIONNUM(SDL_IMAGE_MAJOR_VERSION, SDL_IMAGE_MINOR_VERSION, SDL_IMAGE_MICRO_VERSION)")] public const int SDL_IMAGE_VERSION = ((3) * 1000000 + (3) * 1000 + (0)); - [NativeTypeName("#define IMG_PROP_ANIMATION_STREAM_CREATE_FILENAME_STRING \"SDL_image.animation_stream.create.filename\"")] - public static ReadOnlySpan IMG_PROP_ANIMATION_STREAM_CREATE_FILENAME_STRING => "SDL_image.animation_stream.create.filename"u8; + [NativeTypeName("#define IMG_PROP_ANIMATION_ENCODER_CREATE_FILENAME_STRING \"SDL_image.animation_encoder.create.filename\"")] + public static ReadOnlySpan IMG_PROP_ANIMATION_ENCODER_CREATE_FILENAME_STRING => "SDL_image.animation_encoder.create.filename"u8; + + [NativeTypeName("#define IMG_PROP_ANIMATION_ENCODER_CREATE_IOSTREAM_POINTER \"SDL_image.animation_encoder.create.iostream\"")] + public static ReadOnlySpan IMG_PROP_ANIMATION_ENCODER_CREATE_IOSTREAM_POINTER => "SDL_image.animation_encoder.create.iostream"u8; + + [NativeTypeName("#define IMG_PROP_ANIMATION_ENCODER_CREATE_IOSTREAM_AUTOCLOSE_BOOLEAN \"SDL_image.animation_encoder.create.iostream.autoclose\"")] + public static ReadOnlySpan IMG_PROP_ANIMATION_ENCODER_CREATE_IOSTREAM_AUTOCLOSE_BOOLEAN => "SDL_image.animation_encoder.create.iostream.autoclose"u8; + + [NativeTypeName("#define IMG_PROP_ANIMATION_ENCODER_CREATE_TYPE_STRING \"SDL_image.animation_encoder.create.type\"")] + public static ReadOnlySpan IMG_PROP_ANIMATION_ENCODER_CREATE_TYPE_STRING => "SDL_image.animation_encoder.create.type"u8; + + [NativeTypeName("#define IMG_PROP_ANIMATION_ENCODER_CREATE_QUALITY_NUMBER \"SDL_image.animation_encoder.create.quality\"")] + public static ReadOnlySpan IMG_PROP_ANIMATION_ENCODER_CREATE_QUALITY_NUMBER => "SDL_image.animation_encoder.create.quality"u8; + + [NativeTypeName("#define IMG_PROP_ANIMATION_ENCODER_CREATE_TIMEBASE_NUMERATOR_NUMBER \"SDL_image.animation_encoder.create.timebase.numerator\"")] + public static ReadOnlySpan IMG_PROP_ANIMATION_ENCODER_CREATE_TIMEBASE_NUMERATOR_NUMBER => "SDL_image.animation_encoder.create.timebase.numerator"u8; + + [NativeTypeName("#define IMG_PROP_ANIMATION_ENCODER_CREATE_TIMEBASE_DENOMINATOR_NUMBER \"SDL_image.animation_encoder.create.timebase.denominator\"")] + public static ReadOnlySpan IMG_PROP_ANIMATION_ENCODER_CREATE_TIMEBASE_DENOMINATOR_NUMBER => "SDL_image.animation_encoder.create.timebase.denominator"u8; + + [NativeTypeName("#define IMG_PROP_ANIMATION_DECODER_CREATE_FILENAME_STRING \"SDL_image.animation_decoder.create.filename\"")] + public static ReadOnlySpan IMG_PROP_ANIMATION_DECODER_CREATE_FILENAME_STRING => "SDL_image.animation_decoder.create.filename"u8; + + [NativeTypeName("#define IMG_PROP_ANIMATION_DECODER_CREATE_IOSTREAM_POINTER \"SDL_image.animation_decoder.create.iostream\"")] + public static ReadOnlySpan IMG_PROP_ANIMATION_DECODER_CREATE_IOSTREAM_POINTER => "SDL_image.animation_decoder.create.iostream"u8; + + [NativeTypeName("#define IMG_PROP_ANIMATION_DECODER_CREATE_IOSTREAM_AUTOCLOSE_BOOLEAN \"SDL_image.animation_decoder.create.iostream.autoclose\"")] + public static ReadOnlySpan IMG_PROP_ANIMATION_DECODER_CREATE_IOSTREAM_AUTOCLOSE_BOOLEAN => "SDL_image.animation_decoder.create.iostream.autoclose"u8; + + [NativeTypeName("#define IMG_PROP_ANIMATION_DECODER_CREATE_TYPE_STRING \"SDL_image.animation_decoder.create.type\"")] + public static ReadOnlySpan IMG_PROP_ANIMATION_DECODER_CREATE_TYPE_STRING => "SDL_image.animation_decoder.create.type"u8; + + [NativeTypeName("#define IMG_PROP_ANIMATION_DECODER_CREATE_TIMEBASE_NUMERATOR_NUMBER \"SDL_image.animation_decoder.create.timebase.numerator\"")] + public static ReadOnlySpan IMG_PROP_ANIMATION_DECODER_CREATE_TIMEBASE_NUMERATOR_NUMBER => "SDL_image.animation_decoder.create.timebase.numerator"u8; + + [NativeTypeName("#define IMG_PROP_ANIMATION_DECODER_CREATE_TIMEBASE_DENOMINATOR_NUMBER \"SDL_image.animation_decoder.create.timebase.denominator\"")] + public static ReadOnlySpan IMG_PROP_ANIMATION_DECODER_CREATE_TIMEBASE_DENOMINATOR_NUMBER => "SDL_image.animation_decoder.create.timebase.denominator"u8; + + [NativeTypeName("#define IMG_PROP_METADATA_IGNORE_PROPS_BOOLEAN \"SDL_image.metadata.ignore_props\"")] + public static ReadOnlySpan IMG_PROP_METADATA_IGNORE_PROPS_BOOLEAN => "SDL_image.metadata.ignore_props"u8; - [NativeTypeName("#define IMG_PROP_ANIMATION_STREAM_CREATE_IOSTREAM_POINTER \"SDL_image.animation_stream.create.iostream\"")] - public static ReadOnlySpan IMG_PROP_ANIMATION_STREAM_CREATE_IOSTREAM_POINTER => "SDL_image.animation_stream.create.iostream"u8; + [NativeTypeName("#define IMG_PROP_METADATA_DESCRIPTION_STRING \"SDL_image.metadata.description\"")] + public static ReadOnlySpan IMG_PROP_METADATA_DESCRIPTION_STRING => "SDL_image.metadata.description"u8; - [NativeTypeName("#define IMG_PROP_ANIMATION_STREAM_CREATE_IOSTREAM_AUTOCLOSE_BOOLEAN \"SDL_image.animation_stream.create.iostream.autoclose\"")] - public static ReadOnlySpan IMG_PROP_ANIMATION_STREAM_CREATE_IOSTREAM_AUTOCLOSE_BOOLEAN => "SDL_image.animation_stream.create.iostream.autoclose"u8; + [NativeTypeName("#define IMG_PROP_METADATA_COPYRIGHT_STRING \"SDL_image.metadata.copyright\"")] + public static ReadOnlySpan IMG_PROP_METADATA_COPYRIGHT_STRING => "SDL_image.metadata.copyright"u8; - [NativeTypeName("#define IMG_PROP_ANIMATION_STREAM_CREATE_TYPE_STRING \"SDL_image.animation_stream.create.type\"")] - public static ReadOnlySpan IMG_PROP_ANIMATION_STREAM_CREATE_TYPE_STRING => "SDL_image.animation_stream.create.type"u8; + [NativeTypeName("#define IMG_PROP_METADATA_TITLE_STRING \"SDL_image.metadata.title\"")] + public static ReadOnlySpan IMG_PROP_METADATA_TITLE_STRING => "SDL_image.metadata.title"u8; - [NativeTypeName("#define IMG_PROP_ANIMATION_STREAM_CREATE_QUALITY_NUMBER \"SDL_image.animation_stream.create.quality\"")] - public static ReadOnlySpan IMG_PROP_ANIMATION_STREAM_CREATE_QUALITY_NUMBER => "SDL_image.animation_stream.create.quality"u8; + [NativeTypeName("#define IMG_PROP_METADATA_AUTHOR_STRING \"SDL_image.metadata.author\"")] + public static ReadOnlySpan IMG_PROP_METADATA_AUTHOR_STRING => "SDL_image.metadata.author"u8; - [NativeTypeName("#define IMG_PROP_ANIMATION_STREAM_CREATE_TIMEBASE_NUMERATOR_NUMBER \"SDL_image.animation_stream.create.timebase.numerator\"")] - public static ReadOnlySpan IMG_PROP_ANIMATION_STREAM_CREATE_TIMEBASE_NUMERATOR_NUMBER => "SDL_image.animation_stream.create.timebase.numerator"u8; + [NativeTypeName("#define IMG_PROP_METADATA_CREATION_TIME_STRING \"SDL_image.metadata.creation_time\"")] + public static ReadOnlySpan IMG_PROP_METADATA_CREATION_TIME_STRING => "SDL_image.metadata.creation_time"u8; - [NativeTypeName("#define IMG_PROP_ANIMATION_STREAM_CREATE_TIMEBASE_DENOMINATOR_NUMBER \"SDL_image.animation_stream.create.timebase.denominator\"")] - public static ReadOnlySpan IMG_PROP_ANIMATION_STREAM_CREATE_TIMEBASE_DENOMINATOR_NUMBER => "SDL_image.animation_stream.create.timebase.denominator"u8; + [NativeTypeName("#define IMG_PROP_METADATA_LOOP_COUNT_NUMBER \"SDL_image.metadata.loop_count\"")] + public static ReadOnlySpan IMG_PROP_METADATA_LOOP_COUNT_NUMBER => "SDL_image.metadata.loop_count"u8; } } diff --git a/SDL3_ttf-CS/SDL3_ttf/ClangSharp/SDL_ttf.g.cs b/SDL3_ttf-CS/SDL3_ttf/ClangSharp/SDL_ttf.g.cs index 92d42aa7..c09fe475 100644 --- a/SDL3_ttf-CS/SDL3_ttf/ClangSharp/SDL_ttf.g.cs +++ b/SDL3_ttf-CS/SDL3_ttf/ClangSharp/SDL_ttf.g.cs @@ -272,6 +272,13 @@ public static unsafe partial class SDL3_ttf [DllImport("SDL3_ttf", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern TTF_Direction TTF_GetFontDirection(TTF_Font* font); + [DllImport("SDL3_ttf", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] + [return: NativeTypeName("bool")] + public static extern SDLBool TTF_SetFontCharSpacing(TTF_Font* font, int spacing); + + [DllImport("SDL3_ttf", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] + public static extern int TTF_GetFontCharSpacing(TTF_Font* font); + [DllImport("SDL3_ttf", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("Uint32")] public static extern uint TTF_StringToTag([NativeTypeName("const char *")] byte* @string); From 01def28739309e438408453b2a148752073bbcfe Mon Sep 17 00:00:00 2001 From: Dan Balasescu Date: Wed, 13 Aug 2025 16:53:13 +0900 Subject: [PATCH 3/4] Fix build by disabling mpg123 and libflac --- External/build.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/External/build.sh b/External/build.sh index 972f39e6..007ddceb 100755 --- a/External/build.sh +++ b/External/build.sh @@ -173,6 +173,12 @@ run_cmake SDL_ttf ${OUTPUT_LIB/variant/_ttf} -DCMAKE_PREFIX_PATH=$CMAKE_PREFIX_P # TODO: Add support for avif on windows (VisualC script uses dynamic imports) run_cmake SDL_image ${OUTPUT_LIB/variant/_image} -DCMAKE_PREFIX_PATH=$CMAKE_PREFIX_PATH -DSDLIMAGE_AVIF=OFF -DSDLIMAGE_DEPS_SHARED=OFF -DSDLIMAGE_VENDORED=ON -run_cmake SDL_mixer ${OUTPUT_LIB/variant/_mixer} -DCMAKE_PREFIX_PATH=$CMAKE_PREFIX_PATH -DSDLMIXER_DEPS_SHARED=OFF -DSDLMIXER_VENDORED=ON +# -DSDLMIXER_MP3_MPG123=OFF is used because upstream build is broken. Fallback to dr_mp3. +# See: https://github.com/libsdl-org/SDL_mixer/pull/744#issuecomment-3180682130 +# Fixing using the proposed solution causes more issues. +# +# -DSDLMIXER_FLAC_LIBFLAC is used because the build fails on android-x86. Fallback to dr_flac. +# See: https://github.com/libsdl-org/SDL_mixer/issues/745 +run_cmake SDL_mixer ${OUTPUT_LIB/variant/_mixer} -DCMAKE_PREFIX_PATH=$CMAKE_PREFIX_PATH -DSDLMIXER_MP3_MPG123=OFF -DSDLMIXER_FLAC_LIBFLAC=OFF -DSDLMIXER_DEPS_SHARED=OFF -DSDLMIXER_VENDORED=ON popd From 9a9cc1576e3c29f7da2f76a36a6260a70d56d819 Mon Sep 17 00:00:00 2001 From: Susko3 Date: Fri, 15 Aug 2025 21:37:16 +0200 Subject: [PATCH 4/4] Fix missing info in comment --- External/build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/External/build.sh b/External/build.sh index 007ddceb..ca01125b 100755 --- a/External/build.sh +++ b/External/build.sh @@ -177,7 +177,7 @@ run_cmake SDL_image ${OUTPUT_LIB/variant/_image} -DCMAKE_PREFIX_PATH=$CMAKE_PREF # See: https://github.com/libsdl-org/SDL_mixer/pull/744#issuecomment-3180682130 # Fixing using the proposed solution causes more issues. # -# -DSDLMIXER_FLAC_LIBFLAC is used because the build fails on android-x86. Fallback to dr_flac. +# -DSDLMIXER_FLAC_LIBFLAC=OFF is used because the build fails on android-x86. Fallback to dr_flac. # See: https://github.com/libsdl-org/SDL_mixer/issues/745 run_cmake SDL_mixer ${OUTPUT_LIB/variant/_mixer} -DCMAKE_PREFIX_PATH=$CMAKE_PREFIX_PATH -DSDLMIXER_MP3_MPG123=OFF -DSDLMIXER_FLAC_LIBFLAC=OFF -DSDLMIXER_DEPS_SHARED=OFF -DSDLMIXER_VENDORED=ON