From 97126c89e0a8b98b40e1fd441e1c74cd9d6ae81b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9=20Poussineau?= Date: Fri, 8 May 2009 10:29:31 +0000 Subject: [PATCH] Revert part of r40686 See issue #4471 for more details. svn path=/trunk/; revision=40836 --- reactos/boot/freeldr/freeldr/ui/tuimenu.c | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/reactos/boot/freeldr/freeldr/ui/tuimenu.c b/reactos/boot/freeldr/freeldr/ui/tuimenu.c index 2fa4d5d05f0..68cb05fd088 100644 --- a/reactos/boot/freeldr/freeldr/ui/tuimenu.c +++ b/reactos/boot/freeldr/freeldr/ui/tuimenu.c @@ -23,7 +23,6 @@ TuiDisplayMenu(PCSTR MenuItemList[], UiMenuKeyPressFilterCallback KeyPressFilter) { UI_MENU_INFO MenuInformation; - ULONG InitialClockSecond; ULONG LastClockSecond; ULONG CurrentClockSecond; ULONG KeyPress; @@ -60,7 +59,7 @@ TuiDisplayMenu(PCSTR MenuItemList[], // // Get the current second of time // - InitialClockSecond = LastClockSecond = ArcGetRelativeTime(); + LastClockSecond = ArcGetTime()->Second; // // Process keys @@ -88,12 +87,12 @@ TuiDisplayMenu(PCSTR MenuItemList[], // // 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 @@ -104,10 +103,7 @@ TuiDisplayMenu(PCSTR MenuItemList[], // Update the time information // LastClockSecond = CurrentClockSecond; - MenuInformation.MenuTimeRemaining = - InitialClockSecond + MenuTimeOut - LastClockSecond; - if (MenuInformation.MenuTimeRemaining < 0) - MenuInformation.MenuTimeRemaining = 0; + MenuInformation.MenuTimeRemaining--; // // Update the menu @@ -116,7 +112,7 @@ TuiDisplayMenu(PCSTR MenuItemList[], VideoCopyOffScreenBufferToVRAM(); } } - else if (MenuInformation.MenuTimeRemaining == 0) + else { // // A time out occurred, exit this loop and return default OS