[ros-diffs] [hpoussin] 29628: Display a simple bootlogo, instead of a black screen if /SOS option is not provided

hpoussin at svn.reactos.org hpoussin at svn.reactos.org
Tue Oct 16 12:40:18 CEST 2007


Author: hpoussin
Date: Tue Oct 16 14:40:17 2007
New Revision: 29628

URL: http://svn.reactos.org/svn/reactos?rev=29628&view=rev
Log:
Display a simple bootlogo, instead of a black screen if /SOS option is not provided

Modified:
    trunk/reactos/ntoskrnl/inbv/inbv.c

Modified: trunk/reactos/ntoskrnl/inbv/inbv.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/inbv/inbv.c?rev=29628&r1=29627&r2=29628&view=diff
==============================================================================
--- trunk/reactos/ntoskrnl/inbv/inbv.c (original)
+++ trunk/reactos/ntoskrnl/inbv/inbv.c Tue Oct 16 14:40:17 2007
@@ -4,6 +4,24 @@
 #define NDEBUG
 #include <debug.h>
 #include "bootvid/bootvid.h"
+
+//
+// Bitmap Header
+//
+typedef struct tagBITMAPINFOHEADER
+{
+    ULONG biSize;
+    LONG biWidth;
+    LONG biHeight;
+    USHORT biPlanes;
+    USHORT biBitCount;
+    ULONG biCompression;
+    ULONG biSizeImage;
+    LONG biXPelsPerMeter;
+    LONG biYPelsPerMeter;
+    ULONG biClrUsed;
+    ULONG biClrImportant;
+} BITMAPINFOHEADER, *PBITMAPINFOHEADER;
 
 /* GLOBALS *******************************************************************/
 
@@ -593,6 +611,19 @@
         if (!InbvBootDriverInstalled) return;
 
         /* FIXME: TODO, display full-screen bitmap */
+        Bitmap = InbvGetResourceAddress(5);
+        if (Bitmap)
+        {
+            PBITMAPINFOHEADER BitmapInfoHeader = (PBITMAPINFOHEADER)Bitmap;
+            ULONG Top, Left;
+
+            Left = (640 - BitmapInfoHeader->biWidth) / 2;
+            if (BitmapInfoHeader->biHeight < 0)
+                Top = (480 + BitmapInfoHeader->biHeight) / 2;
+            else
+                Top = (480 - BitmapInfoHeader->biHeight) / 2;
+            InbvBitBlt(Bitmap, Left, Top);
+        }
     }
 
     /* Do we have a system thread? */




More information about the Ros-diffs mailing list