mirror of https://github.com/acidanthera/audk.git
To fix,
1662 Graphics Console Driver: No checking for invalid parameter in SetMode() 8588 Graphic Console should not chech PixelFormat for 800*600 resolution git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2242 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
fb610f2ac1
commit
e313deb992
|
@ -378,9 +378,7 @@ GraphicsConsoleControllerDriverStart (
|
|||
);
|
||||
if (!EFI_ERROR (Status)) {
|
||||
if ((Info->HorizontalResolution == 800) &&
|
||||
(Info->VerticalResolution == 600) &&
|
||||
((Info->PixelFormat == PixelRedGreenBlueReserved8BitPerColor) ||
|
||||
(Info->PixelFormat == PixelBlueGreenRedReserved8BitPerColor))) {
|
||||
(Info->VerticalResolution == 600)) {
|
||||
Status = Private->GraphicsOutput->SetMode (Private->GraphicsOutput, ModeNumber);
|
||||
if (!EFI_ERROR (Status)) {
|
||||
gBS->FreePool (Info);
|
||||
|
@ -1164,6 +1162,10 @@ GraphicsConsoleConOutSetMode (
|
|||
UgaDraw = Private->UgaDraw;
|
||||
ModeData = &(Private->ModeData[ModeNumber]);
|
||||
|
||||
if (ModeData->Columns <= 0 && ModeData->Rows <= 0) {
|
||||
return EFI_UNSUPPORTED;
|
||||
}
|
||||
|
||||
//
|
||||
// Make sure the requested mode number is supported
|
||||
//
|
||||
|
|
Loading…
Reference in New Issue