]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsole.c
Set graphic mode if graphic mode is not same with the one which GraphicsConsole drive...
[mirror_edk2.git] / MdeModulePkg / Universal / Console / GraphicsConsoleDxe / GraphicsConsole.c
index 52b0ec651cd39314b462bb63d4f99aab33b37ca9..212564a5c8cf553cb4072bec4a133aca08850bec 100644 (file)
@@ -497,6 +497,19 @@ GraphicsConsoleControllerDriverStart (
         }\r
       }\r
     }\r
+    if (ModeNumber != Private->GraphicsOutput->Mode->Mode) {\r
+      //\r
+      // Current graphics mode is not set or is not set to the mode which we has found,\r
+      // set the new graphic mode.\r
+      //\r
+      Status = Private->GraphicsOutput->SetMode (Private->GraphicsOutput, ModeNumber);\r
+      if (EFI_ERROR (Status)) {\r
+        //\r
+        // The mode set operation failed\r
+        //\r
+        goto Error;\r
+      }\r
+    }\r
   } else if (FeaturePcdGet (PcdUgaConsumeSupport)) {\r
     //\r
     // At first try to set user-defined resolution\r