Improve the way we are doing the timing: When the timeout is > 0, we refresh its display. When it becomes == 0, we exit the waiting-loop and do the right action (start the default OS, ...). However, when we press a key, it is set to -1 by convention, that means, no timeout. The timeout display is then cleared ONLY ONCE since there is no need to refresh it each time we do a waiting-loop-turn when the timeout is == -1.
svn path=/trunk/; revision=58010
if (CanEscape && KeyPress == KEY_ESC) return FALSE;
/* Check if there is a countdown */
- if (MenuInformation.MenuTimeRemaining)
+ if (MenuInformation.MenuTimeRemaining > 0)
{
/* Get the updated time, seconds only */
CurrentClockSecond = ArcGetTime()->Second;
UiDrawMenuBox(&MenuInformation);
}
}
- else
+ else if (MenuInformation.MenuTimeRemaining == 0)
{
/* A time out occurred, exit this loop and return default OS */
break;
//
// Check if there is a countdown
//
- if (MenuInformation.MenuTimeRemaining)
+ if (MenuInformation.MenuTimeRemaining > 0)
{
//
// Get the updated time, seconds only
VideoCopyOffScreenBufferToVRAM();
}
}
- else
+ else if (MenuInformation.MenuTimeRemaining == 0)
{
//
// A time out occurred, exit this loop and return default OS