qemu-trivial
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-trivial] [Qemu-devel] patch: add delay=<msecs> suboption to -d


From: Dave Mielke
Subject: Re: [Qemu-trivial] [Qemu-devel] patch: add delay=<msecs> suboption to -display curses
Date: Tue, 27 May 2014 11:23:48 -0400
User-agent: Mutt/1.5.21 (2010-09-15)

[quoted lines by Gerd Hoffmann on 2014/05/27 at 11:09 +0200]

>Which means exactly?  They are not prepared to find data for more than
>one key event in the buffer?

Not exactly. The bad code is an attempt to do a nonblocking keyboard read in 
MS-DOS. It goes like this:

1) Peek the DOS keyboard buffer start and end pointers. If the buffer is empty 
   then return "no input".

2) If no key is pressed then return "no input".

3) Use the blocking MS-DOS interface to wait for the next key and return it.

So, as you can see, there's a serious problem. Let's say that a key press and 
release go in together. That give us the following situation:

1) Peek the DOS input buffer. It isn't empty so proceed to the next step.

2) No key is pressed so return "no input".

I really do think, therefore, that the only way to deal with this is to slow 
down the input to typing speed.

-- 
Dave Mielke           | 2213 Fox Crescent | The Bible is the very Word of God.
Phone: 1-613-726-0014 | Ottawa, Ontario   | http://Mielke.cc/bible/
EMail: address@hidden | Canada  K2A 1H7   | http://FamilyRadio.com/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]