*the word 'End' in front of Europapean lobster*
This commit is contained in:
parent
69d2c9495b
commit
969bde5116
1 changed files with 8 additions and 11 deletions
|
@ -378,12 +378,11 @@ int main(int argc, char **argv) {
|
|||
hexagram_can_if *can_if;
|
||||
hexagram_window *window;
|
||||
|
||||
int fd, fd2,
|
||||
int fd,
|
||||
width = 1024,
|
||||
height = 480;
|
||||
|
||||
struct timeval now,
|
||||
last = {
|
||||
struct timeval last = {
|
||||
.tv_sec = 0,
|
||||
.tv_usec = 0
|
||||
};
|
||||
|
@ -398,8 +397,7 @@ int main(int argc, char **argv) {
|
|||
|
||||
display = hexagram_window_display(window);
|
||||
|
||||
fd = hexagram_can_if_fd(can_if);
|
||||
fd2 = hexagram_window_display_fd(window);
|
||||
fd = hexagram_can_if_fd(can_if);
|
||||
|
||||
/*
|
||||
* Set up the rendering surfaces
|
||||
|
@ -415,8 +413,6 @@ int main(int argc, char **argv) {
|
|||
/*
|
||||
* Present the background layer
|
||||
*/
|
||||
hexagram_window_refresh_bg(window);
|
||||
hexagram_window_swap_buffer(window);
|
||||
hexagram_window_show(window);
|
||||
|
||||
/*
|
||||
|
@ -425,15 +421,15 @@ int main(int argc, char **argv) {
|
|||
FD_ZERO(&rfds);
|
||||
|
||||
FD_SET(fd, &rfds);
|
||||
FD_SET(fd2, &rfds);
|
||||
|
||||
while (1) {
|
||||
struct timeval timeout = {
|
||||
.tv_sec = 0,
|
||||
.tv_usec = 250000
|
||||
};
|
||||
}, now;
|
||||
|
||||
int pending;
|
||||
int pending,
|
||||
nfds = fd + 1;
|
||||
|
||||
(void)gettimeofday(&now, NULL);
|
||||
|
||||
|
@ -446,6 +442,7 @@ int main(int argc, char **argv) {
|
|||
case MapNotify:
|
||||
case Expose:
|
||||
hexagram_window_refresh_bg(window);
|
||||
cluster_draw(fg, 0, 0, width, height);
|
||||
hexagram_window_swap_buffer(window);
|
||||
|
||||
break;
|
||||
|
@ -461,7 +458,7 @@ int main(int argc, char **argv) {
|
|||
|
||||
memcpy(&rready, &rfds, sizeof(rfds));
|
||||
|
||||
if (select(fd2, &rready, NULL, NULL, &timeout) < 0) {
|
||||
if (select(nfds, &rready, NULL, NULL, &timeout) < 0) {
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue