From 132a20f8b4a81a61a67cf16c84c6b0183fba8222 Mon Sep 17 00:00:00 2001 From: Andrew Opalach Date: Fri, 4 Oct 2024 13:25:32 -0400 Subject: Add wrap files and some comments Signed-off-by: Andrew Opalach --- src/poll_common.c | 1 + src/window_glfw.c | 1 + 2 files changed, 2 insertions(+) (limited to 'src') diff --git a/src/poll_common.c b/src/poll_common.c index 4174dae..bc637d7 100644 --- a/src/poll_common.c +++ b/src/poll_common.c @@ -20,6 +20,7 @@ bool stl_poll_common(struct aki_pollfd *fds, bool block) return false; } + // This happens consistantly if a program is lagging too much. TODO: Recovery. if (fds[0].revents & (POLLERR | POLLHUP | POLLNVAL)) { // Fatal error. al_log_error("poll_common", "poll() returned error in revents (%d).", fds[0].revents); al_assert(false); diff --git a/src/window_glfw.c b/src/window_glfw.c index 41e6172..c586ffc 100644 --- a/src/window_glfw.c +++ b/src/window_glfw.c @@ -174,6 +174,7 @@ static bool window_glfw_create_window(struct stl_window *window, s32 width, s32 #if defined STELA_POLL_INLINE glfwSetWindowRefreshCallback(glfw->window, refresh_callback); #endif + // This seems to be called if we block too long after creating a window. glfwSetWindowCloseCallback(glfw->window, close_callback); return true; -- cgit v1.2.3-101-g0448