Allow to clear framebuffer screen with any, custom background color
This commit is contained in:
parent
c576f7f8f2
commit
e311cad8f7
@ -154,6 +154,17 @@ typedef struct _HAL_FRAMEBUFFER_DATA
|
|||||||
UINT BitsPerPixel;
|
UINT BitsPerPixel;
|
||||||
UINT Pitch;
|
UINT Pitch;
|
||||||
PVOID Font;
|
PVOID Font;
|
||||||
|
struct
|
||||||
|
{
|
||||||
|
USHORT BlueShift;
|
||||||
|
USHORT BlueSize;
|
||||||
|
USHORT GreenShift;
|
||||||
|
USHORT GreenSize;
|
||||||
|
USHORT RedShift;
|
||||||
|
USHORT RedSize;
|
||||||
|
USHORT ReservedShift;
|
||||||
|
USHORT ReservedSize;
|
||||||
|
} Pixels;
|
||||||
} HAL_FRAMEBUFFER_DATA, *PHAL_FRAMEBUFFER_DATA;
|
} HAL_FRAMEBUFFER_DATA, *PHAL_FRAMEBUFFER_DATA;
|
||||||
|
|
||||||
/* SMBIOS table header structure */
|
/* SMBIOS table header structure */
|
||||||
|
@ -11,7 +11,10 @@
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Clears the screen by drawing a filled black box.
|
* Clears the screen by drawing a box filled with specified color.
|
||||||
|
*
|
||||||
|
* @param Color
|
||||||
|
* Specifies the color of the box used to fill the screen.
|
||||||
*
|
*
|
||||||
* @return This routine does not return any value.
|
* @return This routine does not return any value.
|
||||||
*
|
*
|
||||||
@ -19,7 +22,7 @@
|
|||||||
*/
|
*/
|
||||||
XTAPI
|
XTAPI
|
||||||
VOID
|
VOID
|
||||||
HlClearScreen(VOID)
|
HlClearScreen(IN ULONG Color)
|
||||||
{
|
{
|
||||||
SIZE_T Line, PositionX, PositionY;
|
SIZE_T Line, PositionX, PositionY;
|
||||||
PULONG FrameBuf;
|
PULONG FrameBuf;
|
||||||
@ -33,7 +36,7 @@ HlClearScreen(VOID)
|
|||||||
Line = PositionY * HlpFrameBufferData.PixelsPerScanLine;
|
Line = PositionY * HlpFrameBufferData.PixelsPerScanLine;
|
||||||
for(PositionX = 0; PositionX < HlpFrameBufferData.Width; PositionX++)
|
for(PositionX = 0; PositionX < HlpFrameBufferData.Width; PositionX++)
|
||||||
{
|
{
|
||||||
FrameBuf[Line + PositionX] = 0x00000000;
|
FrameBuf[Line + PositionX] = Color;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -128,10 +131,18 @@ HlInitializeFrameBuffer(VOID)
|
|||||||
HlpFrameBufferData.BitsPerPixel = KeInitializationBlock->LoaderInformation.FrameBuffer.BitsPerPixel;
|
HlpFrameBufferData.BitsPerPixel = KeInitializationBlock->LoaderInformation.FrameBuffer.BitsPerPixel;
|
||||||
HlpFrameBufferData.PixelsPerScanLine = KeInitializationBlock->LoaderInformation.FrameBuffer.PixelsPerScanLine;
|
HlpFrameBufferData.PixelsPerScanLine = KeInitializationBlock->LoaderInformation.FrameBuffer.PixelsPerScanLine;
|
||||||
HlpFrameBufferData.Pitch = KeInitializationBlock->LoaderInformation.FrameBuffer.Pitch;
|
HlpFrameBufferData.Pitch = KeInitializationBlock->LoaderInformation.FrameBuffer.Pitch;
|
||||||
|
HlpFrameBufferData.Pixels.BlueShift = KeInitializationBlock->LoaderInformation.FrameBuffer.Pixels.BlueShift;
|
||||||
|
HlpFrameBufferData.Pixels.BlueSize = KeInitializationBlock->LoaderInformation.FrameBuffer.Pixels.BlueSize;
|
||||||
|
HlpFrameBufferData.Pixels.GreenShift = KeInitializationBlock->LoaderInformation.FrameBuffer.Pixels.GreenShift;
|
||||||
|
HlpFrameBufferData.Pixels.GreenSize = KeInitializationBlock->LoaderInformation.FrameBuffer.Pixels.GreenSize;
|
||||||
|
HlpFrameBufferData.Pixels.RedShift = KeInitializationBlock->LoaderInformation.FrameBuffer.Pixels.RedShift;
|
||||||
|
HlpFrameBufferData.Pixels.RedSize = KeInitializationBlock->LoaderInformation.FrameBuffer.Pixels.RedSize;
|
||||||
|
HlpFrameBufferData.Pixels.ReservedShift = KeInitializationBlock->LoaderInformation.FrameBuffer.Pixels.ReservedShift;
|
||||||
|
HlpFrameBufferData.Pixels.ReservedSize = KeInitializationBlock->LoaderInformation.FrameBuffer.Pixels.ReservedSize;
|
||||||
HlpFrameBufferData.Initialized = TRUE;
|
HlpFrameBufferData.Initialized = TRUE;
|
||||||
|
|
||||||
/* Clear screen */
|
/* Clear screen */
|
||||||
HlClearScreen();
|
HlClearScreen(0x00000000);
|
||||||
|
|
||||||
/* Return success */
|
/* Return success */
|
||||||
return STATUS_SUCCESS;
|
return STATUS_SUCCESS;
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
/* HAL library routines forward references */
|
/* HAL library routines forward references */
|
||||||
XTAPI
|
XTAPI
|
||||||
VOID
|
VOID
|
||||||
HlClearScreen(VOID);
|
HlClearScreen(IN ULONG Color);
|
||||||
|
|
||||||
XTCDECL
|
XTCDECL
|
||||||
XTSTATUS
|
XTSTATUS
|
||||||
|
Loading…
Reference in New Issue
Block a user