Added keyb_flushnowait() to instantly flush keyboard messages on power up.

This commit is contained in:
claudiol 2016-11-23 16:01:47 -05:00
parent 644dfbb519
commit d75a0be640
3 changed files with 13 additions and 0 deletions

View file

@ -185,6 +185,10 @@ if(saved) {
if(rplTestSystemFlag(FL_HIDEMENU2)) halSetMenu2Height(0);
else halSetMenu2Height(MENU2_HEIGHT);
// FLUSH THE ON-KEY KEYPRESS FROM THE KEYBOARD BUFFER BEFORE ENTERING THE OUTER LOOP
// THIS CAN CANCEL AN EXISTING COMMAND LINE
keyb_flushnowait();
// TODO: ADD OTHER WAKEUP PROCEDURES
}

View file

@ -1020,6 +1020,10 @@ void keyb_setalphalock(int single_alpha_lock);
*/
void keyb_setshiftplane(int leftshift,int rightshift,int alpha,int alphalock);
// OTHER LOWER LEVEL KEYBOARD FUNCTIONS
int keyb_anymsg();
void keyb_flush();
void keyb_flushnowait();

View file

@ -161,6 +161,11 @@ void keyb_flush()
__kused=__kcurrent;
}
// FLUSH KEYBOARD BUFFER WITHOUT WAITING
void keyb_flushnowait()
{
__kused=__kcurrent;
}
// ANALYZE CHANGES IN THE KEYBOARD STATUS AND POST MESSAGES ACCORDINGLY