Date: Thu, 7 Oct 1999 19:58:01 +0200 (IST) From: Eli Zaretskii X-Sender: eliz AT is To: Roland Moritz cc: djgpp AT delorie DOT com Subject: Re: How to empty the keyboard buffer In-Reply-To: <7tibo0$44f$1@rohrpostix.uta4you.at> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: djgpp AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk On Thu, 7 Oct 1999, Roland Moritz wrote: > allegro_init(); > install_timer(); > do > { > c = getch(); > rest(1000); > while (kbhit()) > c = getch(); > } > while (c != 27); > } > > It basically does the same that happens in a game loop, but doesn't work > (When I press a button for a longer time, I hear a loud beeping, which > means, that the kb-buffer is full, right?) That might be because of the rest(1000) call. How much time does it wait? (I don't know much about ALlegro.) If it waits enough time, the keyboard buffer could become full.