[nostalgia/core/glfw] Add extra draw before waiting for event to handle possible user input
This commit is contained in:
parent
0e4bebcc3d
commit
c1a374ca04
@ -42,11 +42,15 @@ ox::Error run(Context *ctx) noexcept {
|
||||
}
|
||||
}
|
||||
} else {
|
||||
sleepTime = 2;
|
||||
sleepTime = 10;
|
||||
}
|
||||
draw(ctx);
|
||||
glfwSwapBuffers(id->window);
|
||||
if (!ctx->constantRefresh) {
|
||||
// redraw before sleeping to update things that may have changed due
|
||||
// to user input this round
|
||||
draw(ctx);
|
||||
glfwSwapBuffers(id->window);
|
||||
glfwWaitEventsTimeout(sleepTime);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user