From 15dcde5ae9e9e9a21eebe32f672b55a38ed103e0 Mon Sep 17 00:00:00 2001 From: Devine Lu Linvega Date: Fri, 3 Jun 2022 14:55:46 -0700 Subject: [PATCH] Improved gameloop --- src/uxn11.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/uxn11.c b/src/uxn11.c index 10f23f6..b0bbaff 100644 --- a/src/uxn11.c +++ b/src/uxn11.c @@ -245,9 +245,7 @@ main(int argc, char **argv) timerfd_settime(fds[1].fd, 0, &screen_tspec, NULL); fds[0].events = fds[1].events = POLLIN; /* main loop */ - while(1) { - if(u.dev[0x0f]) - break; + while(!u.dev[0x0f]) { if(poll(fds, 2, 1000) <= 0) continue; while(XPending(display))