mirror of
https://github.com/CloverHackyColor/CloverBootloader.git
synced 2024-11-23 11:35:19 +01:00
dont show Clover boot volume if it commented out
Signed-off-by: Sergey Isakov <isakov-sl@bk.ru>
This commit is contained in:
parent
43e6e3b3bb
commit
ad0eb1988d
@ -199,12 +199,12 @@ VOID egDumpSetConsoleVideoModes(VOID)
|
||||
// Mode is valid
|
||||
if (BestMode-1 != (UINTN)gST->ConOut->Mode->Mode) {
|
||||
Status = gST->ConOut->SetMode(gST->ConOut, BestMode-1);
|
||||
MsgLog(" Setting mode (%d): %r\n",BestMode, Status);
|
||||
MsgLog(" Setting mode (%d): %r\n", BestMode, Status);
|
||||
} else {
|
||||
MsgLog(" Selected mode (%d) is already set\n",BestMode);
|
||||
MsgLog(" Selected mode (%d) is already set\n", BestMode);
|
||||
}
|
||||
} else if (BestMode != 0) {
|
||||
MsgLog(" Selected mode (%d) is not valid\n",BestMode);
|
||||
MsgLog(" Selected mode (%d) is not valid\n", BestMode);
|
||||
}
|
||||
}
|
||||
|
||||
@ -216,8 +216,8 @@ EFI_STATUS egSetMaxResolution()
|
||||
UINT32 BestMode = 0;
|
||||
UINT32 MaxMode;
|
||||
UINT32 Mode;
|
||||
UINTN SizeOfInfo;
|
||||
EFI_GRAPHICS_OUTPUT_MODE_INFORMATION *Info;
|
||||
UINTN SizeOfInfo = 0;
|
||||
EFI_GRAPHICS_OUTPUT_MODE_INFORMATION *Info = NULL;
|
||||
|
||||
if (GraphicsOutput == NULL) {
|
||||
return EFI_UNSUPPORTED;
|
||||
@ -252,7 +252,7 @@ EFI_STATUS egSetMaxResolution()
|
||||
if (Status == EFI_SUCCESS) {
|
||||
egScreenWidth = Width;
|
||||
egScreenHeight = Height;
|
||||
MsgLog(" - set\n", Status);
|
||||
MsgLog(" - set\n");
|
||||
} else {
|
||||
// we can not set BestMode - search for first one that we can
|
||||
MsgLog(" - %r\n", Status);
|
||||
@ -267,8 +267,8 @@ EFI_STATUS egSetMode(INT32 Next)
|
||||
{
|
||||
EFI_STATUS Status = EFI_UNSUPPORTED;
|
||||
UINT32 MaxMode;
|
||||
UINTN SizeOfInfo;
|
||||
EFI_GRAPHICS_OUTPUT_MODE_INFORMATION *Info;
|
||||
UINTN SizeOfInfo = 0;
|
||||
EFI_GRAPHICS_OUTPUT_MODE_INFORMATION *Info = NULL;
|
||||
INT32 Mode;
|
||||
UINT32 Index = 0;
|
||||
|
||||
@ -734,9 +734,9 @@ EFI_STATUS egScreenShot(VOID)
|
||||
|
||||
static EFI_STATUS GopSetModeAndReconnectTextOut(IN UINT32 ModeNumber)
|
||||
{
|
||||
UINTN HandleCount;
|
||||
UINTN HandleCount = 0;
|
||||
UINTN Index;
|
||||
EFI_HANDLE *HandleBuffer;
|
||||
EFI_HANDLE *HandleBuffer = NULL;
|
||||
EFI_STATUS Status;
|
||||
|
||||
if (GraphicsOutput == NULL) {
|
||||
|
@ -3830,7 +3830,7 @@ static VOID DrawMainMenuEntry(REFIT_MENU_ENTRY *Entry, BOOLEAN selected, INTN XP
|
||||
if (Entry->Row == 0) {
|
||||
BltImageAlpha(SelectionImages[4 + (selected ? 0 : 1)],
|
||||
XPos + (row0TileSize / 2) - (INTN)(INDICATOR_SIZE * 0.5f * GlobalConfig.Scale),
|
||||
row0PosY + row0TileSize + TextHeight + (BCSMargin * 2),
|
||||
row0PosY + row0TileSize + TextHeight + (INTN)((BCSMargin * 2) * GlobalConfig.Scale),
|
||||
&MenuBackgroundPixel, Scale);
|
||||
}
|
||||
}
|
||||
@ -4159,7 +4159,7 @@ VOID MainMenuStyle(IN REFIT_MENU_SCREEN *Screen, IN SCROLL_STATE *State, IN UINT
|
||||
row1PosX = (UGAWidth + 8 - (row1TileSize + (INTN)(8.0f * GlobalConfig.Scale)) * row1Count) >> 1;
|
||||
|
||||
if (GlobalConfig.BootCampStyle && !(GlobalConfig.HideUIFlags & HIDEUI_FLAG_LABEL)) {
|
||||
row1PosY = row0PosY + row0TileSize + (BCSMargin * 2) + TextHeight +
|
||||
row1PosY = row0PosY + row0TileSize + (INTN)((BCSMargin * 2) * GlobalConfig.Scale) + TextHeight +
|
||||
(INTN)(INDICATOR_SIZE * GlobalConfig.Scale) +
|
||||
(INTN)((LayoutButtonOffset + GlobalConfig.TileYSpace) * GlobalConfig.Scale);
|
||||
} else {
|
||||
@ -4174,7 +4174,7 @@ VOID MainMenuStyle(IN REFIT_MENU_SCREEN *Screen, IN SCROLL_STATE *State, IN UINT
|
||||
}
|
||||
|
||||
if (GlobalConfig.BootCampStyle) {
|
||||
textPosY = row0PosY + row0TileSize + TEXT_YMARGIN + BCSMargin;
|
||||
textPosY = row0PosY + row0TileSize + (INTN)((TEXT_YMARGIN + BCSMargin) * GlobalConfig.Scale);
|
||||
}
|
||||
|
||||
FunctextPosY = row1PosY + row1TileSize + (INTN)((GlobalConfig.TileYSpace + LayoutTextOffset) * GlobalConfig.Scale);
|
||||
@ -4214,12 +4214,14 @@ VOID MainMenuStyle(IN REFIT_MENU_SCREEN *Screen, IN SCROLL_STATE *State, IN UINT
|
||||
break;
|
||||
|
||||
case MENU_FUNCTION_PAINT_ALL:
|
||||
{
|
||||
|
||||
// Display Clover boot volume
|
||||
CHAR16 line[256];
|
||||
UnicodeSPrint(line, 255, L"Clover booted from %s", SelfVolume->VolName);
|
||||
DrawTextXY(line, 100, 50, X_IS_LEFT);
|
||||
}
|
||||
if (SelfVolume->VolName[0] != L"#") {
|
||||
CHAR16 *line = PoolPrint(L"Clover booted from %s", SelfVolume->VolName);
|
||||
DrawTextXY(line, (INTN)(100 * GlobalConfig.Scale), (INTN)(50 * GlobalConfig.Scale), X_IS_LEFT);
|
||||
FreePool(line);
|
||||
}
|
||||
|
||||
for (i = 0; i <= State->MaxIndex; i++) {
|
||||
if (Screen->Entries[i]->Row == 0) {
|
||||
if ((i >= State->FirstVisible) && (i <= State->LastVisible)) {
|
||||
|
Loading…
Reference in New Issue
Block a user