glfw: force init error type work around
This commit is contained in:
parent
9f241b5109
commit
44fee8f1f1
10 changed files with 67 additions and 69 deletions
|
|
@ -66,7 +66,7 @@ pub inline fn getRequiredInstanceExtensions() error{ APIUnavailable }![][*:0]con
|
|||
var count: u32 = 0;
|
||||
const extensions = c.glfwGetRequiredInstanceExtensions(&count);
|
||||
getError() catch |err| return switch (err) {
|
||||
Error.APIUnavailable => err,
|
||||
Error.APIUnavailable => @errSetCast(error{ APIUnavailable }, err),
|
||||
else => unreachable,
|
||||
};
|
||||
return @ptrCast([*][*:0]const u8, extensions)[0..count];
|
||||
|
|
@ -153,7 +153,7 @@ pub inline fn getPhysicalDevicePresentationSupport(vk_instance: *opaque {}, vk_p
|
|||
getError() catch |err| return switch (err) {
|
||||
Error.APIUnavailable,
|
||||
Error.PlatformError,
|
||||
=> err,
|
||||
=> @errSetCast(error{ APIUnavailable, PlatformError }, err),
|
||||
else => unreachable,
|
||||
};
|
||||
return v == c.GLFW_TRUE;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue