From 852d232335350542aee46a612a85b0504f36df5d Mon Sep 17 00:00:00 2001 From: Stephen Gutekanst Date: Fri, 12 Aug 2022 00:29:11 -0700 Subject: [PATCH] mach: update callback context ordering Signed-off-by: Stephen Gutekanst --- src/platform/util.zig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/platform/util.zig b/src/platform/util.zig index c8cea234..8b958a29 100644 --- a/src/platform/util.zig +++ b/src/platform/util.zig @@ -6,7 +6,7 @@ const objc = @cImport({ @cInclude("objc/message.h"); }); -pub inline fn printUnhandledErrorCallback(typ: gpu.ErrorType, message: [*:0]const u8, _: void) void { +pub inline fn printUnhandledErrorCallback(_: void, typ: gpu.ErrorType, message: [*:0]const u8) void { switch (typ) { .validation => std.debug.print("gpu: validation error: {s}\n", .{message}), .out_of_memory => std.debug.print("gpu: out of memory: {s}\n", .{message}), @@ -51,10 +51,10 @@ pub const RequestAdapterResponse = struct { }; pub inline fn requestAdapterCallback( + context: *?RequestAdapterResponse, status: gpu.RequestAdapterStatus, adapter: *gpu.Adapter, message: ?[*:0]const u8, - context: *?RequestAdapterResponse, ) void { context.* = RequestAdapterResponse{ .status = status,