VOID LlbFwVideoGetDisplaySize(OUT PULONG Width, OUT PULONG Height, OUT PULONG Depth) { /* Query static settings */ *Width = LlbHwGetScreenWidth() / 8; *Height = LlbHwGetScreenHeight() / 16; /* Depth is always 16 bpp */ *Depth = 16; }
VOID NTAPI LlbVideoClearScreen(IN BOOLEAN OsLoader) { ULONG ScreenSize, p; ULONG BackColor; PUSHORT VideoBuffer; /* Get frame buffer and reset cursor position */ VideoBuffer = LlbHwGetFrameBuffer(); ScreenCursor = 0; /* Backcolor on this machine */ if (OsLoader) { /* Black */ BackColor = 0; } else { /* Deep blue */ #ifdef BLUE_SCREEN BackColor = LlbHwVideoCreateColor(14, 0, 82); #else BackColor = LlbHwVideoCreateColor(0, 0, 0); #endif BackColor = (BackColor << 16) | BackColor; } /* Screen size on this machine */ ScreenSize = LlbHwGetScreenWidth() * LlbHwGetScreenHeight(); /* Clear the screen with the given color */ for (p = 0; p < ScreenSize * 2; p += 4) { *(PULONG)((PCHAR)VideoBuffer + p) = BackColor; } }