gpu: correctly allow unsetting Device.setLostCallback

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
Stephen Gutekanst 2022-08-16 21:13:36 -07:00
parent b28a01d2e8
commit 612c4420d6
3 changed files with 17 additions and 13 deletions

View file

@ -599,7 +599,7 @@ pub const Interface = struct {
);
}
pub inline fn deviceSetDeviceLostCallback(device: *gpu.Device, callback: gpu.Device.LostCallback, userdata: ?*anyopaque) void {
pub inline fn deviceSetDeviceLostCallback(device: *gpu.Device, callback: ?gpu.Device.LostCallback, userdata: ?*anyopaque) void {
procs.deviceSetDeviceLostCallback.?(
@ptrCast(c.WGPUDevice, device),
@ptrCast(c.WGPUDeviceLostCallback, callback),