From c8a0f310f2cbd05e2155210601a738abb3741c7c Mon Sep 17 00:00:00 2001 From: vit9696 Date: Mon, 10 May 2021 12:49:06 +0300 Subject: [PATCH] OcConsoleLib: Revert BltOnly hack for direct renderer --- Library/OcConsoleLib/ConsoleGop.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/Library/OcConsoleLib/ConsoleGop.c b/Library/OcConsoleLib/ConsoleGop.c index 9e669c03..f08386d5 100644 --- a/Library/OcConsoleLib/ConsoleGop.c +++ b/Library/OcConsoleLib/ConsoleGop.c @@ -216,7 +216,6 @@ SwitchMode ( This->Mode->Info->VerticalResolution = Source->VerticalResolution; This->Mode->Info->HorizontalResolution = Source->HorizontalResolution; This->Mode->Info->PixelsPerScanLine = Source->PixelsPerScanLine; - This->Mode->Info->PixelFormat = Source->PixelFormat; } /** @@ -251,18 +250,15 @@ RotateMode ( if (Rotation != 0) { // // macOS requires FrameBufferBase to be 0 for rotation to work, which - // forces it inspect the AppleFramebufferInfo protocol. REF: - // https://github.com/acidanthera/bugtracker/issues/1498#issuecomment-782822654 + // forces it inspect the AppleFramebufferInfo protocol. + // It also requires PixelFormat to be <= PixelBitMask, otherwise Apple + // logo will not show. + // REF: https://github.com/acidanthera/bugtracker/issues/1498#issuecomment-782822654 // - // Windows bootloader only draws directly to the framebuffer, and unlike - // macOS, which always draws to ConOut only, Windows iterates over all GOPs - // finding the one with the framebuffer. Marking our protocol Blit-only - // is not only more consistent, but it also forces Windows to pick another GOP - // protocol (if present) and draw without the rotation on these systems. + // Windows and Linux bootloaders only draw directly to the framebuffer. // This->Mode->FrameBufferBase = 0; This->Mode->FrameBufferSize = 0; - This->Mode->Info->PixelFormat = PixelBltOnly; } CopyMem (&mGop.CustomModeInfo, This->Mode->Info, sizeof (mGop.CustomModeInfo));