[feat] Desktop render color

This commit is contained in:
2026-05-31 19:58:14 +08:00
Unverified
parent 746786a059
commit 175eba1889
27 changed files with 66 additions and 39 deletions
+3 -2
View File
@@ -1,4 +1,5 @@
#include <graphics/context.h>
#include <graphics/draw.h>
gfx_context g_gfx;
@@ -6,10 +7,10 @@ void gfx_init(EFI_GRAPHICS_OUTPUT_PROTOCOL *GOP) {
g_gfx.GOP = GOP;
g_gfx.hr = GOP->Mode->Info->HorizontalResolution;
g_gfx.vr = GOP->Mode->Info->VerticalResolution;
g_gfx.base = (EFI_GRAPHICS_OUTPUT_BLT_PIXEL *) GOP->Mode->FrameBufferBase;
g_gfx.base = (COLOR_RGB *) GOP->Mode->FrameBufferBase;
}
void gfx_clear(void) {
EFI_GRAPHICS_OUTPUT_BLT_PIXEL black = {0, 0, 0, 0};
COLOR_RGB black = {0, 0, 0, 0};
g_gfx.GOP->Blt(g_gfx.GOP, &black, EfiBltVideoFill, 0, 0, 0, 0, g_gfx.hr, g_gfx.vr, 0);
}