[FREELDR]

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
This commit is contained in:
Hermès Bélusca-Maïto
2012-12-26 02:14:46 +00:00
parent 67f7502ca4
commit a894b7ab0b
2 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -560,7 +560,7 @@ UiDisplayMenu(IN PCSTR MenuHeader,
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;
@@ -576,7 +576,7 @@ UiDisplayMenu(IN PCSTR MenuHeader,
UiDrawMenuBox(&MenuInformation);
}
}
else
else if (MenuInformation.MenuTimeRemaining == 0)
{
/* A time out occurred, exit this loop and return default OS */
break;
+2 -2
View File
@@ -93,7 +93,7 @@ TuiDisplayMenu(PCSTR MenuHeader,
//
// Check if there is a countdown
//
if (MenuInformation.MenuTimeRemaining)
if (MenuInformation.MenuTimeRemaining > 0)
{
//
// Get the updated time, seconds only
@@ -118,7 +118,7 @@ TuiDisplayMenu(PCSTR MenuHeader,
VideoCopyOffScreenBufferToVRAM();
}
}
else
else if (MenuInformation.MenuTimeRemaining == 0)
{
//
// A time out occurred, exit this loop and return default OS