handle window exits more gracefully and appropriately.

This commit is contained in:
2025-09-15 14:15:40 +02:00
parent 1e10fec9c6
commit dc3abf992b
5 changed files with 41 additions and 8 deletions

View File

@@ -69,5 +69,13 @@ void window_loop(void) {
glfwSwapBuffers(win);
}
glfwDestroyWindow(win);
void window_close(void) {
assert(win);
glfwSetWindowShouldClose(win, 1);
}
void window_free(void) {
glfwDestroyWindow(win);
render_free();
win = NULL;
}