From 475d12bca24397ee10aa04f3fd6bcf95fc89db42 Mon Sep 17 00:00:00 2001 From: vit9696 Date: Fri, 19 Apr 2019 14:37:27 +0300 Subject: [PATCH] OcConsoleLib: Do not break console mode after changing resolution --- Library/OcConsoleLib/OcConsoleLib.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Library/OcConsoleLib/OcConsoleLib.c b/Library/OcConsoleLib/OcConsoleLib.c index 7e5e6df4..708de379 100644 --- a/Library/OcConsoleLib/OcConsoleLib.c +++ b/Library/OcConsoleLib/OcConsoleLib.c @@ -389,10 +389,11 @@ SetConsoleResolution ( FreePool (HandleBuffer); - Status = gST->ConOut->SetMode (gST->ConOut, 0); - if (EFI_ERROR (Status)) { - DEBUG ((DEBUG_WARN, "OCS: Mode set on ConOut failed after reconnect\n")); - } + // + // It is implementation defined, which console mode is used by ConOut. + // Assume the implementation chooses most sensible value based on GOP resolution. + // If it does not, there is a separate ConsoleMode param, which expands to SetConsoleMode. + // } else { DEBUG ((DEBUG_WARN, "OCS: Failed to find any text output handles\n")); }