Ejemplo n.º 1
0
/****************************************************************************
REMARKS:
Simple utility function to use the event library to check if a key has
been hit. We check for keydown and keyrepeat events, and we also flush the
event queue of all non keydown events to avoid it filling up.
****************************************************************************/
int EVT_kbhit(void)
{
    int     hit;
    event_t evt;

    hit = EVT_peekNext(&evt,EVT_KEYDOWN | EVT_KEYREPEAT);
    EVT_flush(~(EVT_KEYDOWN | EVT_KEYREPEAT));
    return hit;
}
Ejemplo n.º 2
0
 // Look at the next event without removing it
 ibool peekNext(MVEvent& event,ulong mask = evAll)
 { return EVT_peekNext((event_t*)&event,mask); };