diff --git a/server.c b/server.c index b4dd1f6..47e3149 100644 --- a/server.c +++ b/server.c @@ -470,7 +470,7 @@ int main(int argc, const char **argv) server->kbdAddEvent = rfb_key_hook; server->ptrAddEvent = rfb_ptr_hook; rfbInitServer(server); - long usec; + rfbRunEventLoop(server,-1,TRUE); while (rfbIsActive(server)) { if (server->clientHead && TimeToTakePicture()) { vblank_func(drmfd); @@ -479,8 +479,6 @@ int main(int argc, const char **argv) convert_func(buf2, fb->width, fb->height, buf); rfbMarkRectAsModified(server, 0, 0, fb->width, fb->height); } - usec = server->deferUpdateTime*1000; - rfbProcessEvents(server,usec); } if (drm_ver != NULL) drmFreeVersion(drm_ver);