From 9ea4d2aa6f075da2e531c7d45777fe887705080e Mon Sep 17 00:00:00 2001 From: Stephen Gutekanst Date: Mon, 6 Dec 2021 22:14:06 -0700 Subject: [PATCH] glfw: correctly @errorSetCast when returning errors from createWindowSurface Fixes an issue where `createWindowSurface` would not compile (found when updating https://github.com/hexops/mach-glfw-vulkan-example to latest.) Introduced in hexops/mach#115 cc @InKryption Signed-off-by: Stephen Gutekanst --- glfw/src/vulkan.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/glfw/src/vulkan.zig b/glfw/src/vulkan.zig index f27e69f4..8e10fec0 100644 --- a/glfw/src/vulkan.zig +++ b/glfw/src/vulkan.zig @@ -229,7 +229,7 @@ pub inline fn createWindowSurface(vk_instance: anytype, window: Window, vk_alloc Error.InvalidValue => @panic("Attempted to use window with client api to create vulkan surface."), Error.APIUnavailable, Error.PlatformError, - => err, + => @errSetCast(error{ APIUnavailable, PlatformError }, err), else => unreachable, }; return v;