[turbine/glfw] Fix closing when no shutdown handler is set
All checks were successful
Build / build (push) Successful in 1m53s

This commit is contained in:
Gary Talent 2025-05-07 00:01:49 -05:00
parent 88a6cd59f3
commit de8ac10653

View File

@ -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();
}