glfw: add Window.shouldClose
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
parent
badc8939b5
commit
a9446f4ed6
2 changed files with 19 additions and 1 deletions
|
|
@ -133,7 +133,7 @@ pub fn basicTest() !void {
|
|||
defer window.destroy();
|
||||
|
||||
var start = std.time.milliTimestamp();
|
||||
while (std.time.milliTimestamp() < start + 1000 and c.glfwWindowShouldClose(window.handle) != c.GLFW_TRUE) {
|
||||
while (std.time.milliTimestamp() < start + 1000 and !window.shouldClose()) {
|
||||
c.glfwPollEvents();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue