Improved gameloop
This commit is contained in:
parent
3f32b9f6f9
commit
15dcde5ae9
|
@ -245,9 +245,7 @@ main(int argc, char **argv)
|
||||||
timerfd_settime(fds[1].fd, 0, &screen_tspec, NULL);
|
timerfd_settime(fds[1].fd, 0, &screen_tspec, NULL);
|
||||||
fds[0].events = fds[1].events = POLLIN;
|
fds[0].events = fds[1].events = POLLIN;
|
||||||
/* main loop */
|
/* main loop */
|
||||||
while(1) {
|
while(!u.dev[0x0f]) {
|
||||||
if(u.dev[0x0f])
|
|
||||||
break;
|
|
||||||
if(poll(fds, 2, 1000) <= 0)
|
if(poll(fds, 2, 1000) <= 0)
|
||||||
continue;
|
continue;
|
||||||
while(XPending(display))
|
while(XPending(display))
|
||||||
|
|
Loading…
Reference in New Issue