linux: update to latest vulkan-zig API; fix build

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
Stephen Gutekanst 2024-06-02 17:21:15 -07:00 committed by Stephen Gutekanst
parent 130c474874
commit 2a7e6049fd
10 changed files with 188 additions and 175 deletions

View file

@ -100,9 +100,9 @@ const linux_impl = struct {
pub fn tryInit() LoadError!void {
if (state == .init) return;
var dl = std.DynLib.openZ("libgamemode.so.0") catch |e| switch (e) {
var dl = std.DynLib.open("libgamemode.so.0") catch |e| switch (e) {
// backwards-compatibility for old gamemode versions
error.FileNotFound => try std.DynLib.openZ("libgamemode.so"),
error.FileNotFound => try std.DynLib.open("libgamemode.so"),
else => return e,
};
errdefer dl.close();
@ -116,7 +116,7 @@ const linux_impl = struct {
};
}
state = .{ .init = .{ .lib = dl, .syms = sym_table } };
state = State{ .init = .{ .lib = dl, .syms = sym_table } };
}
/// Initialize gamemode, logging a possible failure.