[turbine/glfw] Fix closing when no shutdown handler is set
All checks were successful
Build / build (push) Successful in 1m17s
All checks were successful
Build / build (push) Successful in 1m17s
This commit is contained in:
parent
18109f696d
commit
2623e62aa4
@ -96,7 +96,7 @@ static void handleGlfwKeyEvent(GLFWwindow *window, int key, int, int action, int
|
||||
static void handleGlfwWindowCloseEvent(GLFWwindow *window) noexcept {
|
||||
auto &ctx = *static_cast<Context*>(glfwGetWindowUserPointer(window));
|
||||
ctx.mandatoryRefreshPeriodEnd = ticksMs(ctx) + config::MandatoryRefreshPeriod;
|
||||
ctx.running = !ctx.shutdownHandler(ctx);
|
||||
ctx.running = ctx.shutdownHandler ? !ctx.shutdownHandler(ctx) : false;
|
||||
glfwSetWindowShouldClose(window, !ctx.running);
|
||||
glfwPostEmptyEvent();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user