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
|
// Mode is valid
|
||||||
if (BestMode-1 != (UINTN)gST->ConOut->Mode->Mode) {
|
if (BestMode-1 != (UINTN)gST->ConOut->Mode->Mode) {
|
||||||
Status = gST->ConOut->SetMode(gST->ConOut, BestMode-1);
|
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 {
|
} else {
|
||||||
MsgLog(" Selected mode (%d) is already set\n",BestMode);
|
MsgLog(" Selected mode (%d) is already set\n", BestMode);
|
||||||
}
|
}
|
||||||
} else if (BestMode != 0) {
|
} 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 BestMode = 0;
|
||||||
UINT32 MaxMode;
|
UINT32 MaxMode;
|
||||||
UINT32 Mode;
|
UINT32 Mode;
|
||||||
UINTN SizeOfInfo;
|
UINTN SizeOfInfo = 0;
|
||||||
EFI_GRAPHICS_OUTPUT_MODE_INFORMATION *Info;
|
EFI_GRAPHICS_OUTPUT_MODE_INFORMATION *Info = NULL;
|
||||||
|
|
||||||
if (GraphicsOutput == NULL) {
|
if (GraphicsOutput == NULL) {
|
||||||
return EFI_UNSUPPORTED;
|
return EFI_UNSUPPORTED;
|
||||||
@ -252,7 +252,7 @@ EFI_STATUS egSetMaxResolution()
|
|||||||
if (Status == EFI_SUCCESS) {
|
if (Status == EFI_SUCCESS) {
|
||||||
egScreenWidth = Width;
|
egScreenWidth = Width;
|
||||||
egScreenHeight = Height;
|
egScreenHeight = Height;
|
||||||
MsgLog(" - set\n", Status);
|
MsgLog(" - set\n");
|
||||||
} else {
|
} else {
|
||||||
// we can not set BestMode - search for first one that we can
|
// we can not set BestMode - search for first one that we can
|
||||||
MsgLog(" - %r\n", Status);
|
MsgLog(" - %r\n", Status);
|
||||||
@ -267,8 +267,8 @@ EFI_STATUS egSetMode(INT32 Next)
|
|||||||
{
|
{
|
||||||
EFI_STATUS Status = EFI_UNSUPPORTED;
|
EFI_STATUS Status = EFI_UNSUPPORTED;
|
||||||
UINT32 MaxMode;
|
UINT32 MaxMode;
|
||||||
UINTN SizeOfInfo;
|
UINTN SizeOfInfo = 0;
|
||||||
EFI_GRAPHICS_OUTPUT_MODE_INFORMATION *Info;
|
EFI_GRAPHICS_OUTPUT_MODE_INFORMATION *Info = NULL;
|
||||||
INT32 Mode;
|
INT32 Mode;
|
||||||
UINT32 Index = 0;
|
UINT32 Index = 0;
|
||||||
|
|
||||||
@ -734,9 +734,9 @@ EFI_STATUS egScreenShot(VOID)
|
|||||||
|
|
||||||
static EFI_STATUS GopSetModeAndReconnectTextOut(IN UINT32 ModeNumber)
|
static EFI_STATUS GopSetModeAndReconnectTextOut(IN UINT32 ModeNumber)
|
||||||
{
|
{
|
||||||
UINTN HandleCount;
|
UINTN HandleCount = 0;
|
||||||
UINTN Index;
|
UINTN Index;
|
||||||
EFI_HANDLE *HandleBuffer;
|
EFI_HANDLE *HandleBuffer = NULL;
|
||||||
EFI_STATUS Status;
|
EFI_STATUS Status;
|
||||||
|
|
||||||
if (GraphicsOutput == NULL) {
|
if (GraphicsOutput == NULL) {
|
||||||
|
@ -3830,7 +3830,7 @@ static VOID DrawMainMenuEntry(REFIT_MENU_ENTRY *Entry, BOOLEAN selected, INTN XP
|
|||||||
if (Entry->Row == 0) {
|
if (Entry->Row == 0) {
|
||||||
BltImageAlpha(SelectionImages[4 + (selected ? 0 : 1)],
|
BltImageAlpha(SelectionImages[4 + (selected ? 0 : 1)],
|
||||||
XPos + (row0TileSize / 2) - (INTN)(INDICATOR_SIZE * 0.5f * GlobalConfig.Scale),
|
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);
|
&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;
|
row1PosX = (UGAWidth + 8 - (row1TileSize + (INTN)(8.0f * GlobalConfig.Scale)) * row1Count) >> 1;
|
||||||
|
|
||||||
if (GlobalConfig.BootCampStyle && !(GlobalConfig.HideUIFlags & HIDEUI_FLAG_LABEL)) {
|
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)(INDICATOR_SIZE * GlobalConfig.Scale) +
|
||||||
(INTN)((LayoutButtonOffset + GlobalConfig.TileYSpace) * GlobalConfig.Scale);
|
(INTN)((LayoutButtonOffset + GlobalConfig.TileYSpace) * GlobalConfig.Scale);
|
||||||
} else {
|
} else {
|
||||||
@ -4174,7 +4174,7 @@ VOID MainMenuStyle(IN REFIT_MENU_SCREEN *Screen, IN SCROLL_STATE *State, IN UINT
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (GlobalConfig.BootCampStyle) {
|
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);
|
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;
|
break;
|
||||||
|
|
||||||
case MENU_FUNCTION_PAINT_ALL:
|
case MENU_FUNCTION_PAINT_ALL:
|
||||||
{
|
|
||||||
// Display Clover boot volume
|
// Display Clover boot volume
|
||||||
CHAR16 line[256];
|
if (SelfVolume->VolName[0] != L"#") {
|
||||||
UnicodeSPrint(line, 255, L"Clover booted from %s", SelfVolume->VolName);
|
CHAR16 *line = PoolPrint(L"Clover booted from %s", SelfVolume->VolName);
|
||||||
DrawTextXY(line, 100, 50, X_IS_LEFT);
|
DrawTextXY(line, (INTN)(100 * GlobalConfig.Scale), (INTN)(50 * GlobalConfig.Scale), X_IS_LEFT);
|
||||||
}
|
FreePool(line);
|
||||||
|
}
|
||||||
|
|
||||||
for (i = 0; i <= State->MaxIndex; i++) {
|
for (i = 0; i <= State->MaxIndex; i++) {
|
||||||
if (Screen->Entries[i]->Row == 0) {
|
if (Screen->Entries[i]->Row == 0) {
|
||||||
if ((i >= State->FirstVisible) && (i <= State->LastVisible)) {
|
if ((i >= State->FirstVisible) && (i <= State->LastVisible)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user