Fixed type error in vulkan.createWindowSurface

This commit is contained in:
thedoctorquantum 2023-02-15 14:32:54 +00:00 committed by Stephen Gutekanst
parent 74b0c807b8
commit 5ed584a481

View file

@ -235,12 +235,12 @@ pub inline fn createWindowSurface(vk_instance: anytype, window: Window, vk_alloc
else => @ptrCast(c.VkInstance, vk_instance),
};
return c.glfwCreateWindowSurface(
return @boolToInt(c.glfwCreateWindowSurface(
instance,
window.handle,
if (vk_allocation_callbacks == null) null else @ptrCast(*const c.VkAllocationCallbacks, @alignCast(@alignOf(c.VkAllocationCallbacks), vk_allocation_callbacks)),
@ptrCast(*c.VkSurfaceKHR, @alignCast(@alignOf(c.VkSurfaceKHR), vk_surface_khr)),
) == c.VK_SUCCESS;
) == c.VK_SUCCESS);
}
test "vulkanSupported" {