update to Zig 2024.05

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
Stephen Gutekanst 2024-06-02 16:16:03 -07:00 committed by Stephen Gutekanst
parent c64bc513b9
commit 707e5cc756
16 changed files with 102 additions and 93 deletions

View file

@ -13,7 +13,7 @@ pub inline fn printUnhandledErrorCallback(_: void, ty: gpu.ErrorType, message: [
.unknown => std.log.err("gpu: unknown error: {s}\n", .{message}),
else => unreachable,
}
std.os.exit(1);
std.process.exit(1);
}
pub fn detectBackendType(allocator: std.mem.Allocator) !gpu.BackendType {

View file

@ -1308,7 +1308,7 @@ inline fn printUnhandledErrorCallback(_: void, ty: gpu.ErrorType, message: [*:0]
.unknown => std.log.err("gpu: unknown error: {s}\n", .{message}),
else => unreachable,
}
std.os.exit(1);
std.process.exit(1);
}
fn detectBackendType(allocator: std.mem.Allocator) !gpu.BackendType {

View file

@ -24,7 +24,7 @@ pub fn main() !void {
// Run from the directory where the executable is located so relative assets can be found.
var buffer: [1024]u8 = undefined;
const path = std.fs.selfExeDirPath(buffer[0..]) catch ".";
std.os.chdir(path) catch {};
std.posix.chdir(path) catch {};
var gpa = std.heap.GeneralPurposeAllocator(.{}){};
defer _ = gpa.deinit();