Mail Archives: djgpp/1994/07/25/09:10:16
Leendert Combee writes:
> I'm (still) using djgpp version 1.10/libgrx. Now I was wondering, is
> there something equivalent to MouseGetEvent((M_KEYPRESS | M_POLL),&...)
> that doesn't require a mouse to be present. I only want to check for
> a _possible_ keypress. ...
Use kbhit() to detect that a key was pressed.
If I remember well, you must include gppconio.h and link -lpc to use kbhit().
If you are using a mouse, use something like:
MouseGetEvent((M_POLL | M_EVENT) & (~M_KEYPRESS),&mevent)
or kbhit() will not work. ^^^^^^^^^^^^^^^
Probably you have to test if a mouse is present using MouseDetect() before
calling mouse functions.
Antonio Carlos M. de Queiroz
- Raw text -