]> code.delx.au - refind/blobdiff - libeg/screen.c
Added "1024" as code to not change the mode to the "textmode" token.
[refind] / libeg / screen.c
index 04d128368fe414af71a66895677a4ac25566e995..24b7652eefe87bceab45abafbf2886ff19a6377c 100644 (file)
@@ -200,7 +200,7 @@ BOOLEAN egSetScreenSize(IN OUT UINTN *ScreenWidth, IN OUT UINTN *ScreenHeight) {
          } while (++ModeNum < GraphicsOutput->Mode->MaxMode);
          PauseForKey();
          SwitchToGraphics();
-      } // if()
+      } // if GOP mode (UEFI)
 
    } else if (UgaDraw != NULL) { // UGA mode (EFI 1.x)
       // Try to use current color depth & refresh rate for new mode. Maybe not the best choice
@@ -217,7 +217,7 @@ BOOLEAN egSetScreenSize(IN OUT UINTN *ScreenWidth, IN OUT UINTN *ScreenHeight) {
          // This is just a placeholder until something better can be done....
          Print(L"Error setting graphics mode %d x %d; unsupported mode!\n");
       } // if/else
-   } // if/else if
+   } // if/else if UGA mode (EFI 1.x)
    return (ModeSet);
 } // BOOLEAN egSetScreenSize()
 
@@ -230,7 +230,7 @@ BOOLEAN egSetTextMode(UINT32 RequestedMode) {
    EFI_STATUS    Status;
    BOOLEAN       ChangedIt = FALSE;
 
-   if (RequestedMode != ST->ConOut->Mode->Mode) {
+   if ((RequestedMode != ST->ConOut->Mode->Mode) && (RequestedMode != DONT_CHANGE_TEXT_MODE)) {
 //      SwitchToGraphics();
       Status = refit_call2_wrapper(ST->ConOut->SetMode, ST->ConOut, RequestedMode);
       if (Status == EFI_SUCCESS) {