commit 15dcde5
Devine Lu Linvega
·
2022-06-03 21:55:46 +0000 UTC
parent 3f32b9f
Improved gameloop
1 files changed,
+1,
-3
+1,
-3
1@@ -245,9 +245,7 @@ main(int argc, char **argv)
2 timerfd_settime(fds[1].fd, 0, &screen_tspec, NULL);
3 fds[0].events = fds[1].events = POLLIN;
4 /* main loop */
5- while(1) {
6- if(u.dev[0x0f])
7- break;
8+ while(!u.dev[0x0f]) {
9 if(poll(fds, 2, 1000) <= 0)
10 continue;
11 while(XPending(display))