Skip to content

Commit afd0ed0

Browse files
committed
update sdl for linux support
1 parent 8406d12 commit afd0ed0

File tree

2 files changed

+18
-6
lines changed

2 files changed

+18
-6
lines changed

build.zig

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,22 @@ pub fn build(b: *Build) void {
66
const optimize = b.standardOptimizeOption(.{});
77

88
const VVVVVV_dep = b.dependency("VVVVVV", .{});
9-
const sdl_dep = b.dependency("sdl", .{
10-
.target = target,
11-
.optimize = optimize,
12-
});
9+
const sdl_dep = switch (target.result.os.tag) {
10+
.linux => b.dependency("sdl", .{
11+
.target = target,
12+
.optimize = optimize,
13+
// doesn't support SDL_RENDERER_TARGETTEXTURE
14+
.render_driver_ogl_es = false,
15+
// doesn't support SDL_RENDERER_ACCELERATED
16+
.render_driver_software = false,
17+
}),
18+
else => b.dependency("sdl", .{
19+
.target = target,
20+
.optimize = optimize,
21+
// TODO: disable render_driver_software here as well if/when SDL supports it
22+
//.render_driver_software = false,
23+
}),
24+
};
1325
const physfs_dep = b.dependency("physfs", .{});
1426
const zipcmdline_dep = b.dependency("zipcmdline", .{});
1527
const makeandplay_dep = b.dependency("makeandplay", .{});

build.zig.zon

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
.hash = "12205a24de32aa7d0c9857320b6fb5d644b7c7af1d60dff4f5e0257881f9b0c98f3d",
88
},
99
.sdl = .{
10-
.url = "https://github.com/allyourcodebase/SDL/archive/d3ce72923ada60041a6a4a92628408b0908ce4e0.tar.gz",
11-
.hash = "1220c8b7fffe055e95a991cbaf5d86b4d5ea380294b0b4326b2ee46110613cf7972e",
10+
.url = "https://github.com/allyourcodebase/SDL/archive/b77d252f3f33e4dc1c24f03f5dd24e809f1cd0a3.tar.gz",
11+
.hash = "1220db3c3040b03da7ace818c382a99196b58b539d035c4ab37585c9b7763b12b2ad",
1212
},
1313
// TODO: add a command that maybe checks and/or updates this dependency if/when we update VVVVVV
1414
.physfs = .{

0 commit comments

Comments
 (0)