Skip to content

Commit 2ac6900

Browse files
committed
Update for SDL 3.1.8
1 parent 7ca4807 commit 2ac6900

File tree

4 files changed

+41
-46
lines changed

4 files changed

+41
-46
lines changed

Diff for: LICENSE.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
© 1990 RSA Data Security, Inc.
22
© 1990-1992, 1999-2000, 2004, 2009-2010 Oracle and/or its affiliates
33
© 1993 Sun Microsystems, Inc.
4-
© 1997-2024 Sam Lantinga <[email protected]>
4+
© 1997-2025 Sam Lantinga <[email protected]>
55
© 1998-2021 Gareth McCaughan
66
© 1999-2006 Brian Paul
77
© 2001-2011 Andreas Schiffler

Diff for: README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -51,13 +51,13 @@ Building for x86-64 Windows from any host system works out of the box.
5151

5252
### Linux
5353

54-
Building for x86-64 Linux from any host system works out of the box. The [castholm/SDL_linux_deps](https://github.com/castholm/SDL_linux_deps) package provides supplementary headers and source files requires for compiling for Linux.
54+
Building for x86-64 Linux from any host system works out of the box. The [castholm/SDL_linux_deps](https://github.com/castholm/SDL_linux_deps) package provides supplementary headers and source files required for compiling for Linux.
5555

5656
### macOS
5757

5858
Building for macOS requires Xcode 14.1 or later to be installed on the host system.
5959

60-
When building for non-native targets (such as for x86-64 from a 64-bit ARM Mac), you must provide a path to the macOS SDK with `--sysroot`, which can be obtained by running `xcrun --sdk macosx --show-sdk-path`:
60+
When building for non-native targets (for example for x86-64 from an AArch64 Mac), you must provide a path to the macOS SDK via `--sysroot`. This path can be obtained by running `xcrun --sdk macosx --show-sdk-path`:
6161

6262
```sh
6363
macos_sdk_path=$(xcrun --sdk macosx --show-sdk-path)

Diff for: build.zig

+35-40
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33

44
const std = @import("std");
55

6-
pub const version: std.SemanticVersion = .{ .major = 3, .minor = 1, .patch = 6 };
6+
pub const version: std.SemanticVersion = .{ .major = 3, .minor = 1, .patch = 8 };
77
const formatted_version = std.fmt.comptimePrint("SDL-{}", .{version});
8-
pub const vendor_info = "https://github.com/castholm/SDL 0.1.0";
8+
pub const vendor_info = "https://github.com/castholm/SDL 0.1.1";
99
pub const revision = formatted_version ++ " (" ++ vendor_info ++ ")";
1010

1111
pub fn build(b: *std.Build) void {
@@ -57,20 +57,19 @@ pub fn build(b: *std.Build) void {
5757
.HAVE_GCC_ATOMICS = windows or linux or macos,
5858
.HAVE_GCC_SYNC_LOCK_TEST_AND_SET = false,
5959
.SDL_DISABLE_ALLOCA = false,
60+
.HAVE_FLOAT_H = windows or linux or macos,
61+
.HAVE_STDARG_H = windows or linux or macos,
62+
.HAVE_STDDEF_H = windows or linux or macos,
63+
.HAVE_STDINT_H = windows or linux or macos,
6064
.HAVE_LIBC = windows or linux or macos,
6165
.HAVE_ALLOCA_H = linux or macos,
62-
.HAVE_FLOAT_H = windows or linux or macos,
6366
.HAVE_ICONV_H = linux or macos,
6467
.HAVE_INTTYPES_H = windows or linux or macos,
6568
.HAVE_LIMITS_H = windows or linux or macos,
6669
.HAVE_MALLOC_H = windows or linux,
6770
.HAVE_MATH_H = windows or linux or macos,
6871
.HAVE_MEMORY_H = windows or linux or macos,
6972
.HAVE_SIGNAL_H = windows or linux or macos,
70-
.HAVE_STDARG_H = windows or linux or macos,
71-
.HAVE_STDBOOL_H = windows or linux or macos,
72-
.HAVE_STDDEF_H = windows or linux or macos,
73-
.HAVE_STDINT_H = windows or linux or macos,
7473
.HAVE_STDIO_H = windows or linux or macos,
7574
.HAVE_STDLIB_H = windows or linux or macos,
7675
.HAVE_STRINGS_H = windows or linux or macos,
@@ -80,10 +79,7 @@ pub fn build(b: *std.Build) void {
8079
.HAVE_PTHREAD_NP_H = false,
8180
.HAVE_DLOPEN = linux or macos,
8281
.HAVE_MALLOC = windows or linux or macos,
83-
.HAVE_CALLOC = windows or linux or macos,
84-
.HAVE_REALLOC = windows or linux or macos,
8582
.HAVE_FDATASYNC = linux,
86-
.HAVE_FREE = windows or linux or macos,
8783
.HAVE_GETENV = windows or linux or macos,
8884
.HAVE_GETHOSTNAME = linux or macos,
8985
.HAVE_SETENV = linux or macos,
@@ -99,8 +95,6 @@ pub fn build(b: *std.Build) void {
9995
.HAVE_WCSNLEN = windows or linux or macos,
10096
.HAVE_WCSLCPY = macos,
10197
.HAVE_WCSLCAT = macos,
102-
.HAVE__WCSDUP = windows,
103-
.HAVE_WCSDUP = windows or linux or macos,
10498
.HAVE_WCSSTR = windows or linux or macos,
10599
.HAVE_WCSCMP = windows or linux or macos,
106100
.HAVE_WCSNCMP = windows or linux or macos,
@@ -111,8 +105,6 @@ pub fn build(b: *std.Build) void {
111105
.HAVE_STRLCAT = macos,
112106
.HAVE_STRPBRK = windows or linux or macos,
113107
.HAVE__STRREV = windows,
114-
.HAVE__STRUPR = false,
115-
.HAVE__STRLWR = false,
116108
.HAVE_INDEX = linux or macos,
117109
.HAVE_RINDEX = linux or macos,
118110
.HAVE_STRCHR = windows or linux or macos,
@@ -135,8 +127,6 @@ pub fn build(b: *std.Build) void {
135127
.HAVE_ATOF = windows or linux or macos,
136128
.HAVE_STRCMP = windows or linux or macos,
137129
.HAVE_STRNCMP = windows or linux or macos,
138-
.HAVE_STRCASESTR = linux or macos,
139-
.HAVE_SSCANF = windows or linux or macos,
140130
.HAVE_VSSCANF = windows or linux or macos,
141131
.HAVE_VSNPRINTF = windows or linux or macos,
142132
.HAVE_ACOS = windows or linux or macos,
@@ -151,6 +141,7 @@ pub fn build(b: *std.Build) void {
151141
.HAVE_CEILF = windows or linux or macos,
152142
.HAVE_COPYSIGN = windows or linux or macos,
153143
.HAVE_COPYSIGNF = windows or linux or macos,
144+
.HAVE__COPYSIGN = windows,
154145
.HAVE_COS = windows or linux or macos,
155146
.HAVE_COSF = windows or linux or macos,
156147
.HAVE_EXP = windows or linux or macos,
@@ -189,6 +180,7 @@ pub fn build(b: *std.Build) void {
189180
.HAVE_TANF = windows or linux or macos,
190181
.HAVE_TRUNC = windows or linux or macos,
191182
.HAVE_TRUNCF = windows or linux or macos,
183+
.HAVE__FSEEKI64 = windows,
192184
.HAVE_FOPEN64 = windows or linux,
193185
.HAVE_FSEEKO = windows or linux or macos,
194186
.HAVE_FSEEKO64 = windows or linux,
@@ -218,16 +210,14 @@ pub fn build(b: *std.Build) void {
218210
.HAVE_DBUS_DBUS_H = linux,
219211
.HAVE_FCITX = linux,
220212
.HAVE_IBUS_IBUS_H = linux,
221-
.HAVE_SYS_INOTIFY_H = linux,
222-
.HAVE_INOTIFY_INIT = linux,
223213
.HAVE_INOTIFY_INIT1 = linux,
224214
.HAVE_INOTIFY = linux,
225215
.HAVE_LIBUSB = linux,
226216
.HAVE_O_CLOEXEC = linux or macos,
227217
.HAVE_LINUX_INPUT_H = linux,
228218
.HAVE_LIBUDEV_H = linux,
229219
.HAVE_LIBDECOR_H = linux,
230-
.HAVE_D3D11_H = windows,
220+
.HAVE_LIBURING_H = linux,
231221
.HAVE_DDRAW_H = windows,
232222
.HAVE_DSOUND_H = windows,
233223
.HAVE_DINPUT_H = windows,
@@ -237,25 +227,24 @@ pub fn build(b: *std.Build) void {
237227
.HAVE_DXGI_H = windows,
238228
.HAVE_DXGI1_6_H = windows,
239229
.HAVE_MMDEVICEAPI_H = windows,
240-
.HAVE_AUDIOCLIENT_H = windows,
241230
.HAVE_TPCSHRD_H = windows,
242-
.HAVE_SENSORSAPI_H = windows,
243231
.HAVE_ROAPI_H = windows,
244232
.HAVE_SHELLSCALINGAPI_H = windows,
245233
.USE_POSIX_SPAWN = false,
246234
.SDL_DEFAULT_ASSERT_LEVEL_CONFIGURED = false,
247235
.SDL_DEFAULT_ASSERT_LEVEL = null,
248236
.SDL_AUDIO_DISABLED = false,
237+
.SDL_VIDEO_DISABLED = false,
238+
.SDL_GPU_DISABLED = false,
239+
.SDL_RENDER_DISABLED = false,
240+
.SDL_CAMERA_DISABLED = false,
249241
.SDL_JOYSTICK_DISABLED = false,
250242
.SDL_HAPTIC_DISABLED = false,
251243
.SDL_HIDAPI_DISABLED = false,
244+
.SDL_POWER_DISABLED = false,
252245
.SDL_SENSOR_DISABLED = false,
253-
.SDL_RENDER_DISABLED = false,
246+
.SDL_DIALOG_DISABLED = false,
254247
.SDL_THREADS_DISABLED = false,
255-
.SDL_VIDEO_DISABLED = false,
256-
.SDL_POWER_DISABLED = false,
257-
.SDL_CAMERA_DISABLED = false,
258-
.SDL_GPU_DISABLED = false,
259248
.SDL_AUDIO_DRIVER_ALSA = linux,
260249
.SDL_AUDIO_DRIVER_ALSA_DYNAMIC = if (lazy_linux_deps_values) |x| b.fmt("\"{s}\"", .{x.alsa_soname}) else "",
261250
.SDL_AUDIO_DRIVER_OPENSLES = false,
@@ -324,7 +313,6 @@ pub fn build(b: *std.Build) void {
324313
.SDL_SENSOR_N3DS = false,
325314
.SDL_LOADSO_DLOPEN = linux or macos,
326315
.SDL_LOADSO_DUMMY = false,
327-
.SDL_LOADSO_LDG = false,
328316
.SDL_LOADSO_WINDOWS = windows,
329317
.SDL_THREAD_GENERIC_COND_SUFFIX = windows,
330318
.SDL_THREAD_GENERIC_RWLOCK_SUFFIX = windows,
@@ -343,7 +331,6 @@ pub fn build(b: *std.Build) void {
343331
.SDL_TIME_PS2 = false,
344332
.SDL_TIME_N3DS = false,
345333
.SDL_TIMER_HAIKU = false,
346-
.SDL_TIMER_DUMMY = false,
347334
.SDL_TIMER_UNIX = linux or macos,
348335
.SDL_TIMER_WINDOWS = windows,
349336
.SDL_TIMER_VITA = false,
@@ -395,6 +382,7 @@ pub fn build(b: *std.Build) void {
395382
.SDL_VIDEO_DRIVER_X11_XRANDR = linux,
396383
.SDL_VIDEO_DRIVER_X11_XSCRNSAVER = linux,
397384
.SDL_VIDEO_DRIVER_X11_XSHAPE = linux,
385+
.SDL_VIDEO_DRIVER_X11_XSYNC = linux,
398386
.SDL_VIDEO_DRIVER_QNX = false,
399387
.SDL_VIDEO_RENDER_D3D = windows,
400388
.SDL_VIDEO_RENDER_D3D11 = windows,
@@ -410,13 +398,10 @@ pub fn build(b: *std.Build) void {
410398
.SDL_VIDEO_OPENGL = windows or linux or macos,
411399
.SDL_VIDEO_OPENGL_ES = linux,
412400
.SDL_VIDEO_OPENGL_ES2 = windows or linux or macos,
413-
.SDL_VIDEO_OPENGL_BGL = false,
414401
.SDL_VIDEO_OPENGL_CGL = macos,
415402
.SDL_VIDEO_OPENGL_GLX = linux,
416403
.SDL_VIDEO_OPENGL_WGL = windows,
417404
.SDL_VIDEO_OPENGL_EGL = windows or linux or macos,
418-
.SDL_VIDEO_OPENGL_OSMESA = false,
419-
.SDL_VIDEO_OPENGL_OSMESA_DYNAMIC = "",
420405
.SDL_VIDEO_VULKAN = windows or linux or macos,
421406
.SDL_VIDEO_METAL = macos,
422407
.SDL_GPU_D3D11 = windows,
@@ -446,7 +431,6 @@ pub fn build(b: *std.Build) void {
446431
.SDL_FILESYSTEM_PSP = false,
447432
.SDL_FILESYSTEM_PS2 = false,
448433
.SDL_FILESYSTEM_N3DS = false,
449-
.SDL_STORAGE_GENERIC = windows or linux or macos,
450434
.SDL_STORAGE_STEAM = windows or linux or macos,
451435
.SDL_FSOPS_POSIX = linux or macos,
452436
.SDL_FSOPS_WINDOWS = windows,
@@ -462,11 +446,11 @@ pub fn build(b: *std.Build) void {
462446
.SDL_CAMERA_DRIVER_PIPEWIRE_DYNAMIC = if (lazy_linux_deps_values) |x| b.fmt("\"{s}\"", .{x.pipewire_soname}) else "",
463447
.SDL_CAMERA_DRIVER_VITA = false,
464448
.SDL_DIALOG_DUMMY = false,
465-
.SDL_MISC_DUMMY = false,
466-
.SDL_LOCALE_DUMMY = false,
467449
.SDL_ALTIVEC_BLITTERS = false,
468450
.DYNAPI_NEEDS_DLOPEN = linux or macos,
469451
.SDL_USE_IME = linux,
452+
.SDL_DISABLE_WINDOWS_IME = false,
453+
.SDL_GDK_TEXTINPUT = false,
470454
.SDL_IPHONE_KEYBOARD = false,
471455
.SDL_IPHONE_LAUNCHSCREEN = false,
472456
.SDL_VIDEO_VITA_PIB = false,
@@ -593,6 +577,9 @@ pub fn build(b: *std.Build) void {
593577
if (target.result.cpu.arch == .x86_64 and target.result.abi.isGnu()) {
594578
sdl_mod.addSystemIncludePath(dep.path("include/x86_64-linux-gnu"));
595579
}
580+
if (target.result.cpu.arch == .aarch64 and target.result.abi.isGnu()) {
581+
sdl_mod.addSystemIncludePath(dep.path("include/aarch64-linux-gnu"));
582+
}
596583
}
597584
}
598585
if (macos) {
@@ -664,7 +651,9 @@ pub fn build(b: *std.Build) void {
664651
"src/events/SDL_touch.c",
665652
"src/events/SDL_windowevents.c",
666653
"src/events/imKStoUCS.c",
654+
"src/file/SDL_asyncio.c",
667655
"src/file/SDL_iostream.c",
656+
"src/file/generic/SDL_asyncio_generic.c",
668657
"src/filesystem/SDL_filesystem.c",
669658
"src/gpu/SDL_gpu.c",
670659
"src/haptic/SDL_haptic.c",
@@ -678,7 +667,6 @@ pub fn build(b: *std.Build) void {
678667
"src/main/SDL_runapp.c",
679668
"src/misc/SDL_url.c",
680669
"src/power/SDL_power.c",
681-
"src/process/SDL_process.c",
682670
"src/render/SDL_d3dmath.c",
683671
"src/render/SDL_render.c",
684672
"src/render/SDL_render_unsupported.c",
@@ -755,6 +743,9 @@ pub fn build(b: *std.Build) void {
755743
"src/video/yuv2rgb/yuv_rgb_lsx.c",
756744
"src/video/yuv2rgb/yuv_rgb_sse.c",
757745
"src/video/yuv2rgb/yuv_rgb_std.c",
746+
"src/dialog/SDL_dialog.c",
747+
"src/process/SDL_process.c",
748+
"src/tray/SDL_tray_utils.c",
758749
},
759750
});
760751
if (windows) {
@@ -777,7 +768,7 @@ pub fn build(b: *std.Build) void {
777768
"src/misc/windows/SDL_sysurl.c",
778769
"src/audio/directsound/SDL_directsound.c",
779770
"src/audio/wasapi/SDL_wasapi.c",
780-
"src/audio/wasapi/SDL_wasapi_win32.c",
771+
"src/video/windows/SDL_surface_utils.c",
781772
"src/video/windows/SDL_windowsclipboard.c",
782773
"src/video/windows/SDL_windowsevents.c",
783774
"src/video/windows/SDL_windowsframebuffer.c",
@@ -816,6 +807,7 @@ pub fn build(b: *std.Build) void {
816807
"src/core/windows/SDL_windows.c",
817808
"src/core/windows/SDL_xinput.c",
818809
"src/core/windows/pch.c",
810+
"src/tray/windows/SDL_tray.c",
819811
"src/joystick/hidapi/SDL_hidapi_combined.c",
820812
"src/joystick/hidapi/SDL_hidapi_gamecube.c",
821813
"src/joystick/hidapi/SDL_hidapi_luna.c",
@@ -836,6 +828,7 @@ pub fn build(b: *std.Build) void {
836828
"src/joystick/hidapi/SDL_hidapijoystick.c",
837829
"src/joystick/windows/SDL_dinputjoystick.c",
838830
"src/joystick/windows/SDL_rawinputjoystick.c",
831+
"src/joystick/windows/SDL_windows_gaming_input.c",
839832
"src/joystick/windows/SDL_windowsjoystick.c",
840833
"src/joystick/windows/SDL_xinputjoystick.c",
841834
"src/haptic/windows/SDL_dinputhaptic.c",
@@ -850,7 +843,6 @@ pub fn build(b: *std.Build) void {
850843
"src/video/offscreen/SDL_offscreenvideo.c",
851844
"src/video/offscreen/SDL_offscreenvulkan.c",
852845
"src/video/offscreen/SDL_offscreenwindow.c",
853-
"src/gpu/d3d11/SDL_gpu_d3d11.c",
854846
"src/gpu/d3d12/SDL_gpu_d3d12.c",
855847
"src/gpu/vulkan/SDL_gpu_vulkan.c",
856848
"src/main/generic/SDL_sysmain_callbacks.c",
@@ -897,6 +889,7 @@ pub fn build(b: *std.Build) void {
897889
"src/video/x11/SDL_x11window.c",
898890
"src/video/x11/SDL_x11xfixes.c",
899891
"src/video/x11/SDL_x11xinput2.c",
892+
"src/video/x11/SDL_x11xsync.c",
900893
"src/video/x11/edid-parse.c",
901894
"src/video/x11/xsettings-client.c",
902895
"src/video/kmsdrm/SDL_kmsdrmdyn.c",
@@ -917,6 +910,7 @@ pub fn build(b: *std.Build) void {
917910
"src/video/wayland/SDL_waylandvideo.c",
918911
"src/video/wayland/SDL_waylandvulkan.c",
919912
"src/video/wayland/SDL_waylandwindow.c",
913+
"src/tray/unix/SDL_tray.c",
920914
"src/core/unix/SDL_appid.c",
921915
"src/core/unix/SDL_poll.c",
922916
"src/camera/v4l2/SDL_camera_v4l2.c",
@@ -929,6 +923,7 @@ pub fn build(b: *std.Build) void {
929923
"src/core/linux/SDL_udev.c",
930924
"src/core/linux/SDL_evdev.c",
931925
"src/core/linux/SDL_evdev_kbd.c",
926+
"src/file/io_uring/SDL_asyncio_liburing.c",
932927
"src/core/linux/SDL_evdev_capabilities.c",
933928
"src/core/linux/SDL_threadprio.c",
934929
"src/joystick/hidapi/SDL_hidapi_combined.c",
@@ -950,7 +945,6 @@ pub fn build(b: *std.Build) void {
950945
"src/joystick/hidapi/SDL_hidapi_xboxone.c",
951946
"src/joystick/hidapi/SDL_hidapijoystick.c",
952947
"src/joystick/linux/SDL_sysjoystick.c",
953-
"src/joystick/steam/SDL_steamcontroller.c",
954948
"src/thread/pthread/SDL_systhread.c",
955949
"src/thread/pthread/SDL_sysmutex.c",
956950
"src/thread/pthread/SDL_syscond.c",
@@ -1050,6 +1044,7 @@ pub fn build(b: *std.Build) void {
10501044
"src/video/cocoa/SDL_cocoawindow.m",
10511045
"src/render/metal/SDL_render_metal.m",
10521046
"src/gpu/metal/SDL_gpu_metal.m",
1047+
"src/tray/cocoa/SDL_tray.m",
10531048
"src/thread/pthread/SDL_systhread.c",
10541049
"src/thread/pthread/SDL_sysmutex.c",
10551050
"src/thread/pthread/SDL_syscond.c",
@@ -1104,18 +1099,18 @@ pub fn build(b: *std.Build) void {
11041099
sdl_mod.linkFramework("CoreMedia", .{});
11051100
sdl_mod.linkFramework("CoreVideo", .{});
11061101
sdl_mod.linkFramework("Cocoa", .{});
1102+
sdl_mod.linkFramework("UniformTypeIdentifiers", .{ .weak = true });
11071103
sdl_mod.linkFramework("IOKit", .{});
11081104
sdl_mod.linkFramework("ForceFeedback", .{});
11091105
sdl_mod.linkFramework("Carbon", .{});
11101106
sdl_mod.linkFramework("CoreAudio", .{});
11111107
sdl_mod.linkFramework("AudioToolbox", .{});
11121108
sdl_mod.linkFramework("AVFoundation", .{});
11131109
sdl_mod.linkFramework("Foundation", .{});
1114-
sdl_mod.linkFramework("CoreHaptics", .{});
11151110
sdl_mod.linkFramework("GameController", .{ .weak = true });
11161111
sdl_mod.linkFramework("Metal", .{ .weak = true });
11171112
sdl_mod.linkFramework("QuartzCore", .{ .weak = true });
1118-
sdl_mod.linkFramework("UniformTypeIdentifiers", .{ .weak = true });
1113+
sdl_mod.linkFramework("CoreHaptics", .{});
11191114
}
11201115

11211116
sdl_lib.installHeadersDirectory(b.path("include/SDL3"), "SDL3", .{

Diff for: build.zig.zon

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33

44
.{
55
.name = "sdl",
6-
.version = "0.1.0+SDL-3.1.6",
6+
.version = "0.1.1+SDL-3.1.8",
77
.minimum_zig_version = "0.12.1",
88
.dependencies = .{
99
.sdl_linux_deps = .{
10-
.url = "git+https://github.com/castholm/SDL_linux_deps.git#d97bd5c63ede16066be9e90a9279953e24a06501",
11-
.hash = "122046c904f05da5746c6635a2dc5fcddf48f8758bbd780c78ef2c769570d02f0566",
10+
.url = "git+https://github.com/castholm/SDL_linux_deps.git#a8a96da850ff3c3d5c337c7dac95babc1e4aedf9",
11+
.hash = "122086d80e01bd753df35351c1203e08a0a18f4a4ae3b4a10e91b000ab4c15e51ea0",
1212
.lazy = true,
1313
},
1414
},

0 commit comments

Comments
 (0)