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=29... ============================================================================== --- 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? */