Skip to content

Commit

Permalink
change background of embedded theme
Browse files Browse the repository at this point in the history
Signed-off-by: Sergey Isakov <[email protected]>
  • Loading branch information
SergeySlice committed Apr 11, 2020
1 parent da0022e commit de181ae
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion rEFIt_UEFI/Platform/kernel_patcher.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1734,7 +1734,7 @@ FindBootArgs(IN LOADER_ENTRY *Entry)
dtLength = &bootArgs2->deviceTreeLength;
KernelSlide = bootArgs2->kslide;

DBG_RT(Entry, "Found bootArgs2 at 0x%8s, DevTree at %p\n", ptr, dtRoot);
DBG_RT(Entry, "Found bootArgs2 at 0x%llX, DevTree at 0x%llX\n", (UINTN)ptr, (UINTN)bootArgs2->deviceTreeP);
//DBG("bootArgs2->kaddr = 0x%08X and bootArgs2->ksize = 0x%08X\n", bootArgs2->kaddr, bootArgs2->ksize);
//DBG("bootArgs2->efiMode = 0x%02X\n", bootArgs2->efiMode);
DBG_RT(Entry, "bootArgs2->CommandLine = %s\n", bootArgs2->CommandLine);
Expand Down
9 changes: 8 additions & 1 deletion rEFIt_UEFI/libeg/XTheme.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,7 @@ void XTheme::ClearScreen() //and restore background and banner
if (BanHeight < 2) {
BanHeight = ((UGAHeight - (int)(LayoutHeight * Scale)) >> 1);
}
egClearScreen(&MenuBackgroundPixel);
// egClearScreen(&MenuBackgroundPixel); //not needed
if (!(HideUIFlags & HIDEUI_FLAG_BANNER)) {
//Banner image prepared before
if (!Banner.isEmpty()) {
Expand Down Expand Up @@ -495,6 +495,13 @@ void XTheme::ClearScreen() //and restore background and banner
}
if (Background.isEmpty()) {
Background = XImage(UGAWidth, UGAHeight);
if (embedded) {
if (Daylight) {
BlueBackgroundPixel = StdBackgroundPixel;
} else {
BlueBackgroundPixel = DarkEmbeddedBackgroundPixel;
}
}
Background.Fill(BlueBackgroundPixel); //blue opaque. May be better to set black opaque?
}
// now we are sure Background has UGA sizes
Expand Down

0 comments on commit de181ae

Please sign in to comment.