Author: mesyeti <mesyeti@mesyeti.uk>
fix lag caused by fast programs
source/terminal.c | 5 +++++
diff --git a/source/terminal.c b/source/terminal.c index 248e58b03940c5b3308813984162035fbf2e0dac..7f74480200060344ef0c91466c1bab6f3f1feb95 100644 --- a/source/terminal.c +++ b/source/terminal.c @@ -35,11 +35,16 @@ Buffer_Free(&terminal->buffer); } void Terminal_Update(Terminal* terminal) { + int it = 0; + while (SysTerm_DataAvailable(&terminal->term)) { char ch = 0; SysTerm_ReadByte(&terminal->term, &ch); Interpreter_OnRead((Interpreter*) terminal->interpreter, terminal, (UChar) ch); + + ++ it; + if (it > 64) return; } }