mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-09-03 04:13:31 +00:00
[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:
@@ -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;
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user