Set mode 0 (80x25) when Consplitter does not exist.

Signed-off-by: Li Elvin <elvin.li@intel.com>
Reviewed-by: Ni Ruiyu <ruiyu.ni@intel.com>


git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13698 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
li-elvin 2012-09-04 09:43:22 +00:00
parent 99bb0f8dd7
commit 641b4a4628
1 changed files with 10 additions and 0 deletions

View File

@ -88,6 +88,7 @@ UpdateSystemTableConsole (
EFI_DEVICE_PATH_PROTOCOL *Instance;
VOID *Interface;
EFI_HANDLE NewHandle;
EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *TextOut;
ASSERT (VarName != NULL);
ASSERT (ConsoleHandle != NULL);
@ -159,6 +160,15 @@ UpdateSystemTableConsole (
//
*ConsoleHandle = NewHandle;
*ProtocolInterface = Interface;
if (CompareGuid (ConsoleGuid, &gEfiSimpleTextOutProtocolGuid)) {
//
// If it is console out device, set console mode 80x25 if current mode is invalid.
//
TextOut = (EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *) Interface;
if (TextOut->Mode->Mode == -1) {
TextOut->SetMode (TextOut, 0);
}
}
return TRUE;
}
}