Andrzej Zaborowski <[EMAIL PROTECTED]> writes: > Log message: > Reduce redundant timer ticks in VNC, by Anders Melchiorsen. > > CVSWeb URLs: > http://cvs.savannah.gnu.org/viewcvs/qemu/vnc.c?cvsroot=qemu&r1=1.31&r2=1.32
That is great, thanks. However, I have found a small error in the original patch. An additional vga_hw_update() is needed when accepting the VNC connection. Without this fix, resolution changes are not caught while no client is connected, and the display can be clipped when reconnecting. I am also resending my patch for disabling VGA refresh with -nographic Cheers, Anders.
diff --git a/vnc.c b/vnc.c index b5921a3..64889de 100644 --- a/vnc.c +++ b/vnc.c @@ -1904,6 +1904,9 @@ static void vnc_listen_read(void *opaque) struct sockaddr_in addr; socklen_t addrlen = sizeof(addr); + /* Catch-up */ + vga_hw_update(); + vs->csock = accept(vs->lsock, (struct sockaddr *)&addr, &addrlen); if (vs->csock != -1) { VNC_DEBUG("New client on socket %d\n", vs->csock);
diff --git a/qemu/vl.c b/qemu/vl.c index 30c9537..8d67314 100644 --- a/qemu/vl.c +++ b/qemu/vl.c @@ -4902,13 +4902,6 @@ static void dumb_resize(DisplayState *ds, int w, int h) { } -static void dumb_refresh(DisplayState *ds) -{ -#if defined(CONFIG_SDL) - vga_hw_update(); -#endif -} - static void dumb_display_init(DisplayState *ds) { ds->data = NULL; @@ -4916,7 +4909,7 @@ static void dumb_display_init(DisplayState *ds) ds->depth = 0; ds->dpy_update = dumb_update; ds->dpy_resize = dumb_resize; - ds->dpy_refresh = dumb_refresh; + ds->dpy_refresh = NULL; } /***********************************************************/