diff --git a/External/SDL b/External/SDL index 5d9b170..4efdfd9 160000 --- a/External/SDL +++ b/External/SDL @@ -1 +1 @@ -Subproject commit 5d9b170a3d5cf7a5d15c3385d07c0f4eb00ae548 +Subproject commit 4efdfd92a24ff3bbe6780666189000bf5d84ed30 diff --git a/External/SDL_image b/External/SDL_image index 68e4836..e47ff6f 160000 --- a/External/SDL_image +++ b/External/SDL_image @@ -1 +1 @@ -Subproject commit 68e4836aa83830024672b3fb44516d7d307d5602 +Subproject commit e47ff6fa4e9092eec66c1b95118be0fa574c7933 diff --git a/External/SDL_mixer b/External/SDL_mixer index beed06a..1729977 160000 --- a/External/SDL_mixer +++ b/External/SDL_mixer @@ -1 +1 @@ -Subproject commit beed06a8c9cd482699f37060431d6a9dcd2210d5 +Subproject commit 172997758bb69c9217a2caec57bd9450d86dc558 diff --git a/External/SDL_ttf b/External/SDL_ttf index be94566..7285911 160000 --- a/External/SDL_ttf +++ b/External/SDL_ttf @@ -1 +1 @@ -Subproject commit be945666cab3ad72f42ba19651f7e466cd56bd12 +Subproject commit 7285911aea1df44f6522a8c43025a962493c6c24 diff --git a/External/build.sh b/External/build.sh index ca01125..8b8f8c8 100755 --- a/External/build.sh +++ b/External/build.sh @@ -176,9 +176,6 @@ run_cmake SDL_image ${OUTPUT_LIB/variant/_image} -DCMAKE_PREFIX_PATH=$CMAKE_PREF # -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=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 +run_cmake SDL_mixer ${OUTPUT_LIB/variant/_mixer} -DCMAKE_PREFIX_PATH=$CMAKE_PREFIX_PATH -DSDLMIXER_MP3_MPG123=OFF -DSDLMIXER_DEPS_SHARED=OFF -DSDLMIXER_VENDORED=ON popd diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_gpu.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_gpu.g.cs index 9aca735..d3dc028 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_gpu.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_gpu.g.cs @@ -1399,6 +1399,12 @@ namespace SDL [return: NativeTypeName("Uint32")] public static extern uint SDL_CalculateGPUTextureFormatSize(SDL_GPUTextureFormat format, [NativeTypeName("Uint32")] uint width, [NativeTypeName("Uint32")] uint height, [NativeTypeName("Uint32")] uint depth_or_layer_count); + [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] + public static extern SDL_PixelFormat SDL_GetPixelFormatFromGPUTextureFormat(SDL_GPUTextureFormat format); + + [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] + public static extern SDL_GPUTextureFormat SDL_GetGPUTextureFormatFromPixelFormat(SDL_PixelFormat format); + [NativeTypeName("#define SDL_GPU_TEXTUREUSAGE_SAMPLER (1u << 0)")] public const uint SDL_GPU_TEXTUREUSAGE_SAMPLER = (1U << 0); @@ -1501,6 +1507,9 @@ namespace SDL [NativeTypeName("#define SDL_PROP_GPU_DEVICE_CREATE_SHADERS_METALLIB_BOOLEAN \"SDL.gpu.device.create.shaders.metallib\"")] public static ReadOnlySpan SDL_PROP_GPU_DEVICE_CREATE_SHADERS_METALLIB_BOOLEAN => "SDL.gpu.device.create.shaders.metallib"u8; + [NativeTypeName("#define SDL_PROP_GPU_DEVICE_CREATE_D3D12_ALLOW_FEWER_RESOURCE_SLOTS_BOOLEAN \"SDL.gpu.device.create.d3d12.allowtier1resourcebinding\"")] + public static ReadOnlySpan SDL_PROP_GPU_DEVICE_CREATE_D3D12_ALLOW_FEWER_RESOURCE_SLOTS_BOOLEAN => "SDL.gpu.device.create.d3d12.allowtier1resourcebinding"u8; + [NativeTypeName("#define SDL_PROP_GPU_DEVICE_CREATE_D3D12_SEMANTIC_NAME_STRING \"SDL.gpu.device.create.d3d12.semantic\"")] public static ReadOnlySpan SDL_PROP_GPU_DEVICE_CREATE_D3D12_SEMANTIC_NAME_STRING => "SDL.gpu.device.create.d3d12.semantic"u8; diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_hidapi.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_hidapi.g.cs index 31a3b66..316d03c 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_hidapi.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_hidapi.g.cs @@ -108,6 +108,9 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern SDL_hid_device* SDL_hid_open_path([NativeTypeName("const char *")] byte* path); + [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] + public static extern SDL_PropertiesID SDL_hid_get_properties(SDL_hid_device* dev); + [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern int SDL_hid_write(SDL_hid_device* dev, [NativeTypeName("const unsigned char *")] byte* data, [NativeTypeName("size_t")] nuint length); @@ -152,5 +155,8 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern void SDL_hid_ble_scan([NativeTypeName("bool")] SDLBool active); + + [NativeTypeName("#define SDL_PROP_HIDAPI_LIBUSB_DEVICE_HANDLE_POINTER \"SDL.hidapi.libusb.device.handle\"")] + public static ReadOnlySpan SDL_PROP_HIDAPI_LIBUSB_DEVICE_HANDLE_POINTER => "SDL.hidapi.libusb.device.handle"u8; } } diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_hints.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_hints.g.cs index 972bc03..2d51f25 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_hints.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_hints.g.cs @@ -367,6 +367,9 @@ namespace SDL [NativeTypeName("#define SDL_HINT_JOYSTICK_HIDAPI_SWITCH_PLAYER_LED \"SDL_JOYSTICK_HIDAPI_SWITCH_PLAYER_LED\"")] public static ReadOnlySpan SDL_HINT_JOYSTICK_HIDAPI_SWITCH_PLAYER_LED => "SDL_JOYSTICK_HIDAPI_SWITCH_PLAYER_LED"u8; + [NativeTypeName("#define SDL_HINT_JOYSTICK_HIDAPI_SWITCH2 \"SDL_JOYSTICK_HIDAPI_SWITCH2\"")] + public static ReadOnlySpan SDL_HINT_JOYSTICK_HIDAPI_SWITCH2 => "SDL_JOYSTICK_HIDAPI_SWITCH2"u8; + [NativeTypeName("#define SDL_HINT_JOYSTICK_HIDAPI_VERTICAL_JOY_CONS \"SDL_JOYSTICK_HIDAPI_VERTICAL_JOY_CONS\"")] public static ReadOnlySpan SDL_HINT_JOYSTICK_HIDAPI_VERTICAL_JOY_CONS => "SDL_JOYSTICK_HIDAPI_VERTICAL_JOY_CONS"u8; @@ -556,6 +559,9 @@ namespace SDL [NativeTypeName("#define SDL_HINT_RENDER_DIRECT3D11_DEBUG \"SDL_RENDER_DIRECT3D11_DEBUG\"")] public static ReadOnlySpan SDL_HINT_RENDER_DIRECT3D11_DEBUG => "SDL_RENDER_DIRECT3D11_DEBUG"u8; + [NativeTypeName("#define SDL_HINT_RENDER_DIRECT3D11_WARP \"SDL_RENDER_DIRECT3D11_WARP\"")] + public static ReadOnlySpan SDL_HINT_RENDER_DIRECT3D11_WARP => "SDL_RENDER_DIRECT3D11_WARP"u8; + [NativeTypeName("#define SDL_HINT_RENDER_VULKAN_DEBUG \"SDL_RENDER_VULKAN_DEBUG\"")] public static ReadOnlySpan SDL_HINT_RENDER_VULKAN_DEBUG => "SDL_RENDER_VULKAN_DEBUG"u8; diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_pixels.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_pixels.g.cs index 8ba1124..ef73fba 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_pixels.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_pixels.g.cs @@ -254,7 +254,7 @@ namespace SDL SDL_COLORSPACE_BT2020_LIMITED = 0x21102609U, SDL_COLORSPACE_BT2020_FULL = 0x22102609U, SDL_COLORSPACE_RGB_DEFAULT = SDL_COLORSPACE_SRGB, - SDL_COLORSPACE_YUV_DEFAULT = SDL_COLORSPACE_JPEG, + SDL_COLORSPACE_YUV_DEFAULT = SDL_COLORSPACE_BT601_LIMITED, } public partial struct SDL_Color diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_render.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_render.g.cs index ae94082..c3e0ee9 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_render.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_render.g.cs @@ -747,6 +747,9 @@ namespace SDL [NativeTypeName("#define SDL_PROP_TEXTURE_VULKAN_TEXTURE_NUMBER \"SDL.texture.vulkan.texture\"")] public static ReadOnlySpan SDL_PROP_TEXTURE_VULKAN_TEXTURE_NUMBER => "SDL.texture.vulkan.texture"u8; + [NativeTypeName("#define SDL_PROP_TEXTURE_GPU_TEXTURE_POINTER \"SDL.texture.gpu.texture\"")] + public static ReadOnlySpan SDL_PROP_TEXTURE_GPU_TEXTURE_POINTER => "SDL.texture.gpu.texture"u8; + [NativeTypeName("#define SDL_RENDERER_VSYNC_DISABLED 0")] public const int SDL_RENDERER_VSYNC_DISABLED = 0; diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_sensor.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_sensor.g.cs index a761cab..af29ab3 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_sensor.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_sensor.g.cs @@ -41,6 +41,7 @@ namespace SDL SDL_SENSOR_GYRO_L, SDL_SENSOR_ACCEL_R, SDL_SENSOR_GYRO_R, + SDL_SENSOR_COUNT, } public static unsafe partial class SDL3 diff --git a/SDL3_mixer-CS/SDL3_mixer/ClangSharp/SDL_mixer.g.cs b/SDL3_mixer-CS/SDL3_mixer/ClangSharp/SDL_mixer.g.cs index d701d93..0ccb55b 100644 --- a/SDL3_mixer-CS/SDL3_mixer/ClangSharp/SDL_mixer.g.cs +++ b/SDL3_mixer-CS/SDL3_mixer/ClangSharp/SDL_mixer.g.cs @@ -158,6 +158,10 @@ namespace SDL [return: NativeTypeName("bool")] public static extern SDLBool MIX_SetTrackIOStream(MIX_Track* track, SDL_IOStream* io, [NativeTypeName("bool")] SDLBool closeio); + [DllImport("SDL3_mixer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] + [return: NativeTypeName("bool")] + public static extern SDLBool MIX_SetTrackRawIOStream(MIX_Track* track, SDL_IOStream* io, [NativeTypeName("const SDL_AudioSpec *")] SDL_AudioSpec* spec, [NativeTypeName("bool")] SDLBool closeio); + [DllImport("SDL3_mixer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] public static extern SDLBool MIX_TagTrack(MIX_Track* track, [NativeTypeName("const char *")] byte* tag);