Revert part of r40686

See issue #4471 for more details.

svn path=/trunk/; revision=40836
This commit is contained in:
Hervé Poussineau 2009-05-08 10:29:31 +00:00
parent a5731d82f9
commit 97126c89e0

View file

@ -23,7 +23,6 @@ TuiDisplayMenu(PCSTR MenuItemList[],
UiMenuKeyPressFilterCallback KeyPressFilter) UiMenuKeyPressFilterCallback KeyPressFilter)
{ {
UI_MENU_INFO MenuInformation; UI_MENU_INFO MenuInformation;
ULONG InitialClockSecond;
ULONG LastClockSecond; ULONG LastClockSecond;
ULONG CurrentClockSecond; ULONG CurrentClockSecond;
ULONG KeyPress; ULONG KeyPress;
@ -60,7 +59,7 @@ TuiDisplayMenu(PCSTR MenuItemList[],
// //
// Get the current second of time // Get the current second of time
// //
InitialClockSecond = LastClockSecond = ArcGetRelativeTime(); LastClockSecond = ArcGetTime()->Second;
// //
// Process keys // Process keys
@ -88,12 +87,12 @@ TuiDisplayMenu(PCSTR MenuItemList[],
// //
// Check if there is a countdown // Check if there is a countdown
// //
if (MenuInformation.MenuTimeRemaining != -1) if (MenuInformation.MenuTimeRemaining)
{ {
// //
// Get the updated time // Get the updated time, seconds only
// //
CurrentClockSecond = ArcGetRelativeTime(); CurrentClockSecond = ArcGetTime()->Second;
// //
// Check if more then a second has now elapsed // Check if more then a second has now elapsed
@ -104,10 +103,7 @@ TuiDisplayMenu(PCSTR MenuItemList[],
// Update the time information // Update the time information
// //
LastClockSecond = CurrentClockSecond; LastClockSecond = CurrentClockSecond;
MenuInformation.MenuTimeRemaining = MenuInformation.MenuTimeRemaining--;
InitialClockSecond + MenuTimeOut - LastClockSecond;
if (MenuInformation.MenuTimeRemaining < 0)
MenuInformation.MenuTimeRemaining = 0;
// //
// Update the menu // Update the menu
@ -116,7 +112,7 @@ TuiDisplayMenu(PCSTR MenuItemList[],
VideoCopyOffScreenBufferToVRAM(); VideoCopyOffScreenBufferToVRAM();
} }
} }
else if (MenuInformation.MenuTimeRemaining == 0) else
{ {
// //
// A time out occurred, exit this loop and return default OS // A time out occurred, exit this loop and return default OS