kmscube: change to register only drm fd for select
[glsdk/kmscube.git] / kmscube.c
index c6d1f3289cea3c1ed878d44d2e9134db6f7aaddc..1de58be4d6136f3cb31d2724ac103397eedd7873 100644 (file)
--- a/kmscube.c
+++ b/kmscube.c
@@ -630,7 +630,6 @@ int main(int argc, char *argv[])
                        drm.mode[DISP_ID]->vdisplay);
 
        FD_ZERO(&fds);
-       FD_SET(0, &fds);
        FD_SET(drm.fd, &fds);
 
        ret = init_gbm();
@@ -702,8 +701,7 @@ int main(int argc, char *argv[])
                                printf("select timeout!\n");
                                return -1;
                        } else if (FD_ISSET(0, &fds)) {
-                               printf("user interrupted!\n");
-                               break;
+                               continue;
                        }
                        drmHandleEvent(drm.fd, &evctx);
                }