glfw: add Window.destroy

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
Stephen Gutekanst 2021-07-18 21:41:21 -07:00
parent 04a213b411
commit badc8939b5
2 changed files with 29 additions and 2 deletions

View file

@ -130,7 +130,7 @@ pub fn basicTest() !void {
std.debug.print("note: failed to create window: {}\n", .{err});
return;
};
defer c.glfwDestroyWindow(window.handle);
defer window.destroy();
var start = std.time.milliTimestamp();
while (std.time.milliTimestamp() < start + 1000 and c.glfwWindowShouldClose(window.handle) != c.GLFW_TRUE) {