kmscube: change to register only drm fd for select
authorKarthik Ramanan <a0393906@ti.com>
Fri, 21 Feb 2014 09:32:08 +0000 (15:02 +0530)
committerKarthik Ramanan <a0393906@ti.com>
Sat, 12 Apr 2014 08:25:38 +0000 (13:55 +0530)
Signed-off-by: Karthik Ramanan <a0393906@ti.com>
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);
                }