glfw: always check init errors
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
parent
003a1db2e6
commit
26e0db2064
1 changed files with 2 additions and 4 deletions
|
|
@ -40,10 +40,8 @@ pub const version = @import("version.zig");
|
|||
///
|
||||
/// @thread_safety This function must only be called from the main thread.
|
||||
pub inline fn init() Error!void {
|
||||
if (c.glfwInit() != c.GLFW_TRUE) {
|
||||
return try getError();
|
||||
}
|
||||
return;
|
||||
_ = c.glfwInit();
|
||||
return try getError();
|
||||
}
|
||||
|
||||
/// Terminates the GLFW library.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue