[NTOSKRNL]
authorCameron Gutman <aicommander@gmail.com>
Fri, 19 Feb 2010 03:16:04 +0000 (03:16 +0000)
committerCameron Gutman <aicommander@gmail.com>
Fri, 19 Feb 2010 03:16:04 +0000 (03:16 +0000)
 - Put back the boot logo from the old bootvid
 - Rewrite the old broken progress bar code and enable the progress bar
 - The progress bar works now :)
 - NOTE: Someone should fix the copyright year on the boot logo

svn path=/trunk/; revision=45618

reactos/ntoskrnl/inbv/inbv.c
reactos/ntoskrnl/inbv/logo/5.bmp

index ef0faa0..f498ddb 100644 (file)
@@ -407,38 +407,28 @@ VOID
 NTAPI
 InbvUpdateProgressBar(IN ULONG Progress)
 {
 NTAPI
 InbvUpdateProgressBar(IN ULONG Progress)
 {
-    ULONG FillCount, Left = 0;
+    ULONG FillCount;
 
     /* Make sure the progress bar is enabled, that we own and are installed */
     if ((ShowProgressBar) &&
         (InbvBootDriverInstalled) &&
         (InbvDisplayState == INBV_DISPLAY_STATE_OWNED))
     {
 
     /* Make sure the progress bar is enabled, that we own and are installed */
     if ((ShowProgressBar) &&
         (InbvBootDriverInstalled) &&
         (InbvDisplayState == INBV_DISPLAY_STATE_OWNED))
     {
-        /* Calculate the fill count */
-        FillCount = InbvProgressState.Bias * Progress + InbvProgressState.Floor;
-        FillCount *= 18;
-        FillCount /= 10000;
+        FillCount = InbvProgressState.Bias * Progress * 121 + InbvProgressState.Floor;
+        FillCount /= 1000000;
 
 
-        /* Start fill loop */
-        while (FillCount)
-        {
-            /* Acquire the lock */
-            InbvAcquireLock();
-
-            /* Fill the progress bar */
-            VidSolidColorFill(Left + ProgressBarLeft,
-                              ProgressBarTop,
-                              Left + ProgressBarLeft + 7,
-                              ProgressBarTop + 7,
-                              11);
-
-            /* Release the lock */
-            InbvReleaseLock();
-
-            /* Update the X position */
-            Left += 9;
-            FillCount--;
-        }
+        /* Acquire the lock */
+        InbvAcquireLock();
+
+        /* Fill the progress bar */
+        VidSolidColorFill(ProgressBarLeft,
+                          ProgressBarTop,
+                          ProgressBarLeft + FillCount,
+                          ProgressBarTop + 12,
+                          11);
+
+        /* Release the lock */
+        InbvReleaseLock();
     }
 }
 
     }
 }
 
@@ -613,7 +603,7 @@ DisplayBootBitmap(IN BOOLEAN SosMode)
         /* Is the boot driver installed? */
         if (!InbvBootDriverInstalled) return;
 
         /* Is the boot driver installed? */
         if (!InbvBootDriverInstalled) return;
 
-        /* FIXME: TODO, display full-screen bitmap */
+        /* Display full-screen bitmap */
         Bitmap = InbvGetResourceAddress(5);
         if (Bitmap)
         {
         Bitmap = InbvGetResourceAddress(5);
         if (Bitmap)
         {
@@ -626,6 +616,9 @@ DisplayBootBitmap(IN BOOLEAN SosMode)
             else
                 Top = (480 - BitmapInfoHeader->biHeight) / 2;
             InbvBitBlt(Bitmap, Left, Top);
             else
                 Top = (480 - BitmapInfoHeader->biHeight) / 2;
             InbvBitBlt(Bitmap, Left, Top);
+
+            /* Set progress bar coordinates and display it */
+            InbvSetProgressBarCoordinates(257, 352);
         }
     }
 
         }
     }
 
index f0cce0e..b074e82 100644 (file)
Binary files a/reactos/ntoskrnl/inbv/logo/5.bmp and b/reactos/ntoskrnl/inbv/logo/5.bmp differ