[ros-diffs] [hpoussin] 40836: Revert part of r40686 See issue #4471 for more details.

hpoussin at svn.reactos.org hpoussin at svn.reactos.org
Fri May 8 12:29:32 CEST 2009


Author: hpoussin
Date: Fri May  8 14:29:31 2009
New Revision: 40836

URL: http://svn.reactos.org/svn/reactos?rev=40836&view=rev
Log:
Revert part of r40686
See issue #4471 for more details.

Modified:
    trunk/reactos/boot/freeldr/freeldr/ui/tuimenu.c

Modified: trunk/reactos/boot/freeldr/freeldr/ui/tuimenu.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/ui/tuimenu.c?rev=40836&r1=40835&r2=40836&view=diff
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/ui/tuimenu.c [iso-8859-1] (original)
+++ trunk/reactos/boot/freeldr/freeldr/ui/tuimenu.c [iso-8859-1] Fri May  8 14:29:31 2009
@@ -23,7 +23,6 @@
                UiMenuKeyPressFilterCallback KeyPressFilter)
 {
     UI_MENU_INFO MenuInformation;
-    ULONG InitialClockSecond;
     ULONG LastClockSecond;
     ULONG CurrentClockSecond;
     ULONG KeyPress;
@@ -60,7 +59,7 @@
     //
     // Get the current second of time
     //
-    InitialClockSecond = LastClockSecond = ArcGetRelativeTime();
+    LastClockSecond = ArcGetTime()->Second;
 
     //
     // Process keys
@@ -88,12 +87,12 @@
         //
         // Check if there is a countdown
         //
-        if (MenuInformation.MenuTimeRemaining != -1)
-        {
-            //
-            // Get the updated time
-            //
-            CurrentClockSecond = ArcGetRelativeTime();
+        if (MenuInformation.MenuTimeRemaining)
+        {
+            //
+            // Get the updated time, seconds only
+            //
+            CurrentClockSecond = ArcGetTime()->Second;
 
             //
             // Check if more then a second has now elapsed
@@ -104,10 +103,7 @@
                 // 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 @@
                 VideoCopyOffScreenBufferToVRAM();
             }
         }
-        else if (MenuInformation.MenuTimeRemaining == 0)
+        else
         {
             //
             // A time out occurred, exit this loop and return default OS



More information about the Ros-diffs mailing list