ref: 96cd5856cc26e842cd0f5ac53b384eeb6b156b14
parent: 63d6c61cc1806b6da52bc39513af7bdedf4a9fb4
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Tue Apr 18 22:18:28 EDT 2017
vt: but not too fast :-) if drawing can't keep up with the host, make sure we eventually redraw the screen and check for user events.
--- a/sys/src/cmd/vt/main.c
+++ b/sys/src/cmd/vt/main.c
@@ -645,7 +645,7 @@
return(rcvchar());
free(hostbuf);
hostbufp = hostbuf = nbrecvp(hc);
- if(host_avail())
+ if(host_avail() && nrand(8))
return(rcvchar());
}
drawscreen();
@@ -662,10 +662,13 @@
{ mc->c, &mc->Mouse, CHANRCV }, { mc->resizec, nil, CHANRCV }, { kc->c, &kbdchar, CHANRCV },- { hc, &hostbuf, CHANNOP },+ { hc, &hostbuf, CHANRCV }, { nil, nil, CHANEND },};
- if(hostbuf == nil) a[AHOST].op = CHANRCV;
+ if(blocked)
+ a[AHOST].op = CHANNOP;
+ else if(hostbuf != nil)
+ a[AHOST].op = CHANNOBLK;
Next:
if(display->bufp > display->buf)
flushimage(display, 1);
--
⑨