www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/04/19/07:26:42

Date: Sun, 19 Apr 1998 14:25:05 +0300 (IDT)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: QBallLives <qballlives AT aol DOT com>
cc: djgpp AT delorie DOT com
Subject: Re: Keybord Read Problem
In-Reply-To: <1998041709091600.FAA04289@ladder03.news.aol.com>
Message-ID: <Pine.SUN.3.91.980419142443.23362R-100000@is>
MIME-Version: 1.0

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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019