This commit is contained in:
JerryXiao 2023-04-25 21:00:46 +08:00
parent 078fdc1539
commit 920656e181
Signed by: Jerry
GPG key ID: 22618F758B5BE2E5

View file

@ -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);