minor init error reporting change
This commit is contained in:
@@ -64,8 +64,12 @@ pub fn main(init: std.process.Init) !void {
|
|||||||
|
|
||||||
glfw.windowHint(.CLIENT_API, glfw.NO_API);
|
glfw.windowHint(.CLIENT_API, glfw.NO_API);
|
||||||
ctx.window = glfw.createWindow(c.default_window_size, c.window_title, null, null) orelse {
|
ctx.window = glfw.createWindow(c.default_window_size, c.window_title, null, null) orelse {
|
||||||
|
const err = glfw.getError();
|
||||||
std.log.err("Could not create window", .{});
|
std.log.err("Could not create window", .{});
|
||||||
return error.GlfwError;
|
if (err.description) |description| {
|
||||||
|
std.log.err("{s}", .{description});
|
||||||
|
}
|
||||||
|
return err.error_code.toError();
|
||||||
};
|
};
|
||||||
defer {
|
defer {
|
||||||
ctx.window.destroy();
|
ctx.window.destroy();
|
||||||
|
|||||||
Reference in New Issue
Block a user