Skip to content

Bump ext/SDL from 8e0b39f to 14ae45c #616

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ext/SDL
Submodule SDL updated 63 files
+3 −3 CMakeLists.txt
+2 −2 VisualC-GDK/SDL/SDL.vcxproj
+1 −0 examples/CMakeLists.txt
+1 −1 examples/audio/04-multiple-streams/README.txt
+1 −1 examples/audio/04-multiple-streams/multiple-streams.c
+7 −0 examples/audio/05-planar-data/README.txt
+ examples/audio/05-planar-data/onmouseover.webp
+366 −0 examples/audio/05-planar-data/planar-data.c
+ examples/audio/05-planar-data/thumbnail.png
+125 −2 include/SDL3/SDL_audio.h
+56 −29 include/SDL3/SDL_gpu.h
+46 −26 include/SDL3/SDL_haptic.h
+2 −2 include/SDL3/SDL_hints.h
+13 −14 include/SDL3/SDL_mouse.h
+1 −2 include/SDL3/SDL_render.h
+0 −3 include/SDL3/SDL_surface.h
+3 −3 include/SDL3/SDL_video.h
+56 −6 src/audio/SDL_audio.c
+171 −28 src/audio/SDL_audiocvt.c
+7 −0 src/audio/SDL_sysaudio.h
+1 −1 src/audio/aaudio/SDL_aaudio.c
+7 −1 src/audio/pipewire/SDL_pipewire.c
+1 −0 src/core/linux/SDL_dbus.c
+1 −0 src/core/linux/SDL_dbus.h
+2 −0 src/dynapi/SDL_dynapi.sym
+2 −0 src/dynapi/SDL_dynapi_overrides.h
+8 −6 src/dynapi/SDL_dynapi_procs.h
+1 −11 src/events/SDL_clipboardevents.c
+14 −6 src/gpu/SDL_gpu.c
+83 −0 src/gpu/SDL_sysgpu.h
+185 −28 src/gpu/d3d12/SDL_gpu_d3d12.c
+16 −0 src/gpu/metal/SDL_gpu_metal.m
+27 −0 src/gpu/vulkan/SDL_gpu_vulkan.c
+9 −9 src/haptic/SDL_haptic.c
+1 −1 src/haptic/SDL_syshaptic.h
+6 −6 src/haptic/hidapi/SDL_hidapihaptic.c
+6 −6 src/haptic/hidapi/SDL_hidapihaptic.h
+13 −13 src/haptic/hidapi/SDL_hidapihaptic_c.h
+11 −11 src/haptic/hidapi/SDL_hidapihaptic_lg4ff.c
+3 −3 src/hidapi/SDL_hidapi.c
+35 −0 src/joystick/SDL_joystick.c
+1 −0 src/joystick/SDL_sysjoystick.h
+15 −0 src/joystick/hidapi/SDL_hidapi_steamdeck.c
+1 −2 src/render/SDL_render.c
+9 −2 src/video/SDL_surface.c
+5 −3 src/video/cocoa/SDL_cocoawindow.m
+1 −1 src/video/emscripten/SDL_emscriptenopengles.c
+1 −1 src/video/openvr/SDL_openvrvideo.c
+2 −1 src/video/stb_image.h
+1 −1 src/video/uikit/SDL_uikitview.m
+126 −7 src/video/wayland/SDL_waylanddatamanager.c
+24 −13 src/video/wayland/SDL_waylanddatamanager.h
+88 −97 src/video/wayland/SDL_waylandevents.c
+3 −0 src/video/wayland/SDL_waylandvideo.c
+75 −62 src/video/windows/SDL_windowsevents.c
+1 −1 src/video/windows/SDL_windowswindow.c
+2 −1 src/video/windows/SDL_windowswindow.h
+68 −51 src/video/x11/SDL_x11events.c
+2 −0 src/video/x11/SDL_x11video.c
+2 −0 src/video/x11/SDL_x11window.h
+4 −0 test/testaudio.c
+35 −0 test/testautomation_surface.c
+1 −1 test/testhaptic.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// <auto-generated>
// This code was generated by the following tool on 2025-04-18 21:18:19 GMT+00:00:
// This code was generated by the following tool on 2025-04-25 22:59:52 GMT+00:00:
// https://github.com/bottlenoselabs/c2cs (v2025.2.20.0)
//
// Changes to this file may cause incorrect behavior and will be lost if the code is regenerated.
Expand Down
2 changes: 1 addition & 1 deletion src/cs/production/Interop.SDL/Generated/Runtime.g.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// <auto-generated>
// This code was generated by the following tool on 2025-04-18 21:18:19 GMT+00:00:
// This code was generated by the following tool on 2025-04-25 22:59:52 GMT+00:00:
// https://github.com/bottlenoselabs/c2cs (v2025.2.20.0)
//
// Changes to this file may cause incorrect behavior and will be lost if the code is regenerated.
Expand Down
64 changes: 47 additions & 17 deletions src/cs/production/Interop.SDL/Generated/SDL.g.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// <auto-generated>
// This code was generated by the following tool on 2025-04-18 21:18:19 GMT+00:00:
// This code was generated by the following tool on 2025-04-25 22:59:52 GMT+00:00:
// https://github.com/bottlenoselabs/c2cs (v2025.2.20.0)
//
// Changes to this file may cause incorrect behavior and will be lost if the code is regenerated.
Expand Down Expand Up @@ -371,7 +371,7 @@ public static unsafe partial class SDL

[LibraryImport(LibraryName, EntryPoint = "SDL_CreateHapticEffect")]
[UnmanagedCallConv(CallConvs = new[] { typeof(CallConvCdecl) })]
public static partial int SDL_CreateHapticEffect(SDL_Haptic* haptic, SDL_HapticEffect* effect);
public static partial SDL_HapticEffectID SDL_CreateHapticEffect(SDL_Haptic* haptic, SDL_HapticEffect* effect);

[LibraryImport(LibraryName, EntryPoint = "SDL_CreatePalette")]
[UnmanagedCallConv(CallConvs = new[] { typeof(CallConvCdecl) })]
Expand Down Expand Up @@ -503,7 +503,7 @@ public static unsafe partial class SDL

[LibraryImport(LibraryName, EntryPoint = "SDL_DestroyHapticEffect")]
[UnmanagedCallConv(CallConvs = new[] { typeof(CallConvCdecl) })]
public static partial void SDL_DestroyHapticEffect(SDL_Haptic* haptic, int effect);
public static partial void SDL_DestroyHapticEffect(SDL_Haptic* haptic, SDL_HapticEffectID effect);

[LibraryImport(LibraryName, EntryPoint = "SDL_DestroyPalette")]
[UnmanagedCallConv(CallConvs = new[] { typeof(CallConvCdecl) })]
Expand Down Expand Up @@ -1159,7 +1159,7 @@ public static unsafe partial class SDL

[LibraryImport(LibraryName, EntryPoint = "SDL_GetHapticEffectStatus")]
[UnmanagedCallConv(CallConvs = new[] { typeof(CallConvCdecl) })]
public static partial CBool SDL_GetHapticEffectStatus(SDL_Haptic* haptic, int effect);
public static partial CBool SDL_GetHapticEffectStatus(SDL_Haptic* haptic, SDL_HapticEffectID effect);

[LibraryImport(LibraryName, EntryPoint = "SDL_GetHapticFeatures")]
[UnmanagedCallConv(CallConvs = new[] { typeof(CallConvCdecl) })]
Expand Down Expand Up @@ -3003,7 +3003,7 @@ public static unsafe partial class SDL

[LibraryImport(LibraryName, EntryPoint = "SDL_RunHapticEffect")]
[UnmanagedCallConv(CallConvs = new[] { typeof(CallConvCdecl) })]
public static partial CBool SDL_RunHapticEffect(SDL_Haptic* haptic, int effect, uint iterations);
public static partial CBool SDL_RunHapticEffect(SDL_Haptic* haptic, SDL_HapticEffectID effect, uint iterations);

[LibraryImport(LibraryName, EntryPoint = "SDL_RunOnMainThread")]
[UnmanagedCallConv(CallConvs = new[] { typeof(CallConvCdecl) })]
Expand Down Expand Up @@ -3567,7 +3567,7 @@ public static unsafe partial class SDL

[LibraryImport(LibraryName, EntryPoint = "SDL_StopHapticEffect")]
[UnmanagedCallConv(CallConvs = new[] { typeof(CallConvCdecl) })]
public static partial CBool SDL_StopHapticEffect(SDL_Haptic* haptic, int effect);
public static partial CBool SDL_StopHapticEffect(SDL_Haptic* haptic, SDL_HapticEffectID effect);

[LibraryImport(LibraryName, EntryPoint = "SDL_StopHapticEffects")]
[UnmanagedCallConv(CallConvs = new[] { typeof(CallConvCdecl) })]
Expand Down Expand Up @@ -3679,7 +3679,7 @@ public static unsafe partial class SDL

[LibraryImport(LibraryName, EntryPoint = "SDL_UpdateHapticEffect")]
[UnmanagedCallConv(CallConvs = new[] { typeof(CallConvCdecl) })]
public static partial CBool SDL_UpdateHapticEffect(SDL_Haptic* haptic, int effect, SDL_HapticEffect* data);
public static partial CBool SDL_UpdateHapticEffect(SDL_Haptic* haptic, SDL_HapticEffectID effect, SDL_HapticEffect* data);

[LibraryImport(LibraryName, EntryPoint = "SDL_UpdateJoysticks")]
[UnmanagedCallConv(CallConvs = new[] { typeof(CallConvCdecl) })]
Expand Down Expand Up @@ -4725,7 +4725,7 @@ public static unsafe partial class SDL

public static readonly CString SDL_PROP_GPU_TEXTURE_CREATE_D3D12_CLEAR_R_FLOAT = (CString)"SDL.gpu.texture.create.d3d12.clear.r"u8;

public static readonly CString SDL_PROP_GPU_TEXTURE_CREATE_D3D12_CLEAR_STENCIL_UINT8 = (CString)"SDL.gpu.texture.create.d3d12.clear.stencil"u8;
public static readonly CString SDL_PROP_GPU_TEXTURE_CREATE_D3D12_CLEAR_STENCIL_NUMBER = (CString)"SDL.gpu.texture.create.d3d12.clear.stencil"u8;

public static readonly CString SDL_PROP_GPU_TEXTURE_CREATE_NAME_STRING = (CString)"SDL.gpu.texture.create.name"u8;

Expand Down Expand Up @@ -5077,7 +5077,7 @@ public static unsafe partial class SDL

public static readonly CString SDL_PROP_WINDOW_KMSDRM_GBM_DEVICE_POINTER = (CString)"SDL.window.kmsdrm.gbm_dev"u8;

public static readonly CString SDL_PROP_WINDOW_OPENVR_OVERLAY_ID = (CString)"SDL.window.openvr.overlay_id"u8;
public static readonly CString SDL_PROP_WINDOW_OPENVR_OVERLAY_ID_NUMBER = (CString)"SDL.window.openvr.overlay_id"u8;

public static readonly CString SDL_PROP_WINDOW_SDR_WHITE_LEVEL_FLOAT = (CString)"SDL.window.SDR_white_level"u8;

Expand Down Expand Up @@ -7074,7 +7074,7 @@ public partial struct SDL_GUID
public partial struct SDL_HapticCondition
{
[FieldOffset(0)]
public ushort type; // size = 2
public SDL_HapticEffectType type; // size = 2

[FieldOffset(4)]
public SDL_HapticDirection direction; // size = 16
Expand Down Expand Up @@ -7114,7 +7114,7 @@ public partial struct SDL_HapticCondition
public partial struct SDL_Hapticant
{
[FieldOffset(0)]
public ushort type; // size = 2
public SDL_HapticEffectType type; // size = 2

[FieldOffset(4)]
public SDL_HapticDirection direction; // size = 16
Expand Down Expand Up @@ -7151,7 +7151,7 @@ public partial struct SDL_Hapticant
public partial struct SDL_HapticCustom
{
[FieldOffset(0)]
public ushort type; // size = 2
public SDL_HapticEffectType type; // size = 2

[FieldOffset(4)]
public SDL_HapticDirection direction; // size = 16
Expand Down Expand Up @@ -7197,7 +7197,7 @@ public partial struct SDL_HapticCustom
public partial struct SDL_HapticDirection
{
[FieldOffset(0)]
public byte type; // size = 1
public SDL_HapticDirectionType type; // size = 1

[FieldOffset(4)] // size = 12
public fixed int dir[3];
Expand All @@ -7207,7 +7207,7 @@ public partial struct SDL_HapticDirection
public partial struct SDL_HapticLeftRight
{
[FieldOffset(0)]
public ushort type; // size = 2
public SDL_HapticEffectType type; // size = 2

[FieldOffset(4)]
public uint length; // size = 4
Expand All @@ -7223,7 +7223,7 @@ public partial struct SDL_HapticLeftRight
public partial struct SDL_HapticPeriodic
{
[FieldOffset(0)]
public ushort type; // size = 2
public SDL_HapticEffectType type; // size = 2

[FieldOffset(4)]
public SDL_HapticDirection direction; // size = 16
Expand Down Expand Up @@ -7269,7 +7269,7 @@ public partial struct SDL_HapticPeriodic
public partial struct SDL_HapticRamp
{
[FieldOffset(0)]
public ushort type; // size = 2
public SDL_HapticEffectType type; // size = 2

[FieldOffset(4)]
public SDL_HapticDirection direction; // size = 16
Expand Down Expand Up @@ -8585,7 +8585,7 @@ public partial struct SDL_Event
public partial struct SDL_HapticEffect
{
[FieldOffset(0)]
public ushort type; // size = 2
public SDL_HapticEffectType type; // size = 2

[FieldOffset(0)]
public SDL_Hapticant constant; // size = 40
Expand Down Expand Up @@ -10603,6 +10603,36 @@ public partial struct SDL_GPUTextureUsageFlags
public static implicit operator SDL_GPUTextureUsageFlags(uint data) => new SDL_GPUTextureUsageFlags() { Data = data };
}

[StructLayout(LayoutKind.Explicit, Size = 1, Pack = 1)]
public partial struct SDL_HapticDirectionType
{
[FieldOffset(0)]
public byte Data;

public static implicit operator byte(SDL_HapticDirectionType data) => data.Data;
public static implicit operator SDL_HapticDirectionType(byte data) => new SDL_HapticDirectionType() { Data = data };
}

[StructLayout(LayoutKind.Explicit, Size = 4, Pack = 4)]
public partial struct SDL_HapticEffectID
{
[FieldOffset(0)]
public int Data;

public static implicit operator int(SDL_HapticEffectID data) => data.Data;
public static implicit operator SDL_HapticEffectID(int data) => new SDL_HapticEffectID() { Data = data };
}

[StructLayout(LayoutKind.Explicit, Size = 2, Pack = 2)]
public partial struct SDL_HapticEffectType
{
[FieldOffset(0)]
public ushort Data;

public static implicit operator ushort(SDL_HapticEffectType data) => data.Data;
public static implicit operator SDL_HapticEffectType(ushort data) => new SDL_HapticEffectType() { Data = data };
}

[StructLayout(LayoutKind.Explicit, Size = 4, Pack = 4)]
public partial struct SDL_HapticID
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -692,7 +692,7 @@ namespace bottlenoselabs.Interop
public static unsafe partial class SDL
{
[global::System.Runtime.InteropServices.DllImportAttribute("SDL3", EntryPoint = "SDL_CreateHapticEffect", ExactSpelling = true)]
public static extern partial int SDL_CreateHapticEffect(global::bottlenoselabs.Interop.SDL.SDL_Haptic* haptic, global::bottlenoselabs.Interop.SDL.SDL_HapticEffect* effect);
public static extern partial global::bottlenoselabs.Interop.SDL.SDL_HapticEffectID SDL_CreateHapticEffect(global::bottlenoselabs.Interop.SDL.SDL_Haptic* haptic, global::bottlenoselabs.Interop.SDL.SDL_HapticEffect* effect);
}
}
namespace bottlenoselabs.Interop
Expand Down Expand Up @@ -956,7 +956,7 @@ namespace bottlenoselabs.Interop
public static unsafe partial class SDL
{
[global::System.Runtime.InteropServices.DllImportAttribute("SDL3", EntryPoint = "SDL_DestroyHapticEffect", ExactSpelling = true)]
public static extern partial void SDL_DestroyHapticEffect(global::bottlenoselabs.Interop.SDL.SDL_Haptic* haptic, int effect);
public static extern partial void SDL_DestroyHapticEffect(global::bottlenoselabs.Interop.SDL.SDL_Haptic* haptic, global::bottlenoselabs.Interop.SDL.SDL_HapticEffectID effect);
}
}
namespace bottlenoselabs.Interop
Expand Down Expand Up @@ -2268,7 +2268,7 @@ namespace bottlenoselabs.Interop
public static unsafe partial class SDL
{
[global::System.Runtime.InteropServices.DllImportAttribute("SDL3", EntryPoint = "SDL_GetHapticEffectStatus", ExactSpelling = true)]
public static extern partial global::Interop.Runtime.CBool SDL_GetHapticEffectStatus(global::bottlenoselabs.Interop.SDL.SDL_Haptic* haptic, int effect);
public static extern partial global::Interop.Runtime.CBool SDL_GetHapticEffectStatus(global::bottlenoselabs.Interop.SDL.SDL_Haptic* haptic, global::bottlenoselabs.Interop.SDL.SDL_HapticEffectID effect);
}
}
namespace bottlenoselabs.Interop
Expand Down Expand Up @@ -5956,7 +5956,7 @@ namespace bottlenoselabs.Interop
public static unsafe partial class SDL
{
[global::System.Runtime.InteropServices.DllImportAttribute("SDL3", EntryPoint = "SDL_RunHapticEffect", ExactSpelling = true)]
public static extern partial global::Interop.Runtime.CBool SDL_RunHapticEffect(global::bottlenoselabs.Interop.SDL.SDL_Haptic* haptic, int effect, uint iterations);
public static extern partial global::Interop.Runtime.CBool SDL_RunHapticEffect(global::bottlenoselabs.Interop.SDL.SDL_Haptic* haptic, global::bottlenoselabs.Interop.SDL.SDL_HapticEffectID effect, uint iterations);
}
}
namespace bottlenoselabs.Interop
Expand Down Expand Up @@ -7084,7 +7084,7 @@ namespace bottlenoselabs.Interop
public static unsafe partial class SDL
{
[global::System.Runtime.InteropServices.DllImportAttribute("SDL3", EntryPoint = "SDL_StopHapticEffect", ExactSpelling = true)]
public static extern partial global::Interop.Runtime.CBool SDL_StopHapticEffect(global::bottlenoselabs.Interop.SDL.SDL_Haptic* haptic, int effect);
public static extern partial global::Interop.Runtime.CBool SDL_StopHapticEffect(global::bottlenoselabs.Interop.SDL.SDL_Haptic* haptic, global::bottlenoselabs.Interop.SDL.SDL_HapticEffectID effect);
}
}
namespace bottlenoselabs.Interop
Expand Down Expand Up @@ -7308,7 +7308,7 @@ namespace bottlenoselabs.Interop
public static unsafe partial class SDL
{
[global::System.Runtime.InteropServices.DllImportAttribute("SDL3", EntryPoint = "SDL_UpdateHapticEffect", ExactSpelling = true)]
public static extern partial global::Interop.Runtime.CBool SDL_UpdateHapticEffect(global::bottlenoselabs.Interop.SDL.SDL_Haptic* haptic, int effect, global::bottlenoselabs.Interop.SDL.SDL_HapticEffect* data);
public static extern partial global::Interop.Runtime.CBool SDL_UpdateHapticEffect(global::bottlenoselabs.Interop.SDL.SDL_Haptic* haptic, global::bottlenoselabs.Interop.SDL.SDL_HapticEffectID effect, global::bottlenoselabs.Interop.SDL.SDL_HapticEffect* data);
}
}
namespace bottlenoselabs.Interop
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// <auto-generated>
// This code was generated by the following tool on 2025-04-18 21:18:19 GMT+00:00:
// This code was generated by the following tool on 2025-04-25 22:59:52 GMT+00:00:
// https://github.com/bottlenoselabs/c2cs (v2025.2.20.0)
//
// Changes to this file may cause incorrect behavior and will be lost if the code is regenerated.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// <auto-generated>
// This code was generated by the following tool on 2025-04-18 21:18:19 GMT+00:00:
// This code was generated by the following tool on 2025-04-25 22:59:52 GMT+00:00:
// https://github.com/bottlenoselabs/c2cs (v2025.2.20.0)
//
// Changes to this file may cause incorrect behavior and will be lost if the code is regenerated.
Expand Down