Mail Archives: djgpp/1998/04/19/07:26:42
On 17 Apr 1998, QBallLives wrote:
> >> unsigned userinput;
> >> if(kbhit()) userinput=getkey() //or getch()
> >>
> >> but the problem is that it does not get the first key you press. You
> >> often get a delay or you have to press the key twice.
>
> It could be the buffered input thing...
>
> try putting this:
>
> setbuf(stdout,NULL); /* fix djgpp's buffered output */
Buffering has no effect on reading keys through BIOS. BIOS reads are
always unbuffered.
- Raw text -