www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/01/26/20:01:30

From: qballlives AT aol DOT com (QBallLives)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: readkey() problem
Date: 27 Jan 1998 00:50:30 GMT
Lines: 27
Message-ID: <19980127005001.TAA19938@ladder01.news.aol.com>
NNTP-Posting-Host: ladder01.news.aol.com
Organization: AOL http://www.aol.com
References: <MPG DOT f36e0bf8faddf6a9896b4 AT news>
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

>Whenever I use readkey() in place of where getch() would normally be, 
>the line that is supposed to be displayed first (ie. "Press any key...") 
>doesn't display until a key is pressed.  Here is an example:
>
>{
>   allegro_init();
>   install_keyboard();
>
>   printf("Hey there!\n");
>   printf("Press any key...");
>   readkey();
>   return 0;
>}
>
>"Hey there!" gets displayed, but "Press any key..." isn't displayed 
>until a key is pressed.  Can anyone help?  Thanks.

I believe that's a buffering issue... but I'm too tired to think of the command
to use to clear that buffer out... my friend dhonn has keyboard routines code
that I believe does the flush you need done...
his page:

http://members.xoom.com/dhonn

Jim the loiterer
aloiterer AT juno DOT com
http://members.xoom.com/JimMcCue/index.htm

- Raw text -


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