]> code.delx.au - refind/commitdiff
Added "1024" as code to not change the mode to the "textmode" token.
authorsrs5694 <srs5694@users.sourceforge.net>
Thu, 27 Dec 2012 21:15:32 +0000 (16:15 -0500)
committersrs5694 <srs5694@users.sourceforge.net>
Thu, 27 Dec 2012 21:15:32 +0000 (16:15 -0500)
NEWS.txt
docs/refind/configfile.html
libeg/screen.c
refind.conf-sample
refind/main.c
refind/screen.c
refind/screen.h

index 441cb1e6e118a3db77fa121d42e78e88b76d480f..50ee4fb9580ec285e9808f1b905cb738c85d7b67 100644 (file)
--- a/NEWS.txt
+++ b/NEWS.txt
@@ -1,3 +1,9 @@
+0.6.2 (??/??/201?):
+-------------------
+
+- Altered default for "textmode" option to not adjust the text mode
+  at all. (Prior versions set it to mode 0 by default.)
+
 0.6.1 (12/21/2012):
 -------------------
 
index ff1f183134b137dd1b4c46a73a9e9d66d8da5739..89fcf3b4e2bd2dc5e262d492a34eba0e1451e3f1 100644 (file)
@@ -185,7 +185,7 @@ timeout 20
 <tr>
    <td><tt>textmode</tt></td>
    <td>text mode number</td>
-   <td>Sets the text-mode video resolution to be used in conjunction with <tt>textonly</tt> or for the line editor and program-launch screens. This option takes a single-digit code. Mode <tt>0</tt> is guaranteed to be present and should be 80x25. Mode <tt>1</tt> is supposed to be either invalid or 80x50, but some systems use this number for something else. Higher values are system-specific. If you set this option to an invalid value, rEFInd pauses during startup to tell you of that fact. Note that setting <tt>textmode</tt> can sometimes force your graphics-mode resolution to a higher value than you specify in <tt>resolution</tt>.</td>
+   <td>Sets the text-mode video resolution to be used in conjunction with <tt>textonly</tt> or for the line editor and program-launch screens. This option takes a single-digit code. Mode <tt>0</tt> is guaranteed to be present and should be 80x25. Mode <tt>1</tt> is supposed to be either invalid or 80x50, but some systems use this number for something else. Higher values are system-specific. Mode <tt>1024</tt> is a rEFInd-specific code that means to <i>not</i> set any mode at all; rEFInd instead uses whatever mode was set when it launched. If you set this option to an invalid value, rEFInd pauses during startup to tell you of that fact. Note that setting <tt>textmode</tt> can sometimes force your graphics-mode resolution to a higher value than you specify in <tt>resolution</tt>.</td>
 </tr>
 <tr>
    <td><tt>resolution</tt></td>
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) {
index 7d77fdef8ea25bc09884ca6f359c01d2f085cfa9..0f580bec96abd0f23f1100ac88be4f5d61618fe9 100644 (file)
@@ -62,14 +62,16 @@ timeout 20
 #textonly
 
 # Set the EFI text mode to be used for textual displays. This option
-# takes a single digit that refers to a mode number. The default is 0
-# (80x25), 1 is sometimes 80x50, and higher numbers are system-specific
-# modes. If you specify an invalid mode, rEFInd pauses during boot to
-# inform you of valid modes.
+# takes a single digit that refers to a mode number. Mode 0 is normally
+# 80x25, 1 is sometimes 80x50, and higher numbers are system-specific
+# modes. Mode 1024 is a special code that tells rEFInd to not set the
+# text mode; it uses whatever was in use when the program was launched.
+# If you specify an invalid mode, rEFInd pauses during boot to inform
+# you of valid modes.
 # CAUTION: On VirtualBox, and perhaps on some real computers, specifying
 # a text mode and uncommenting the "textonly" option while NOT specifying
 # a resolution can result in an unusable display in the booted OS.
-# Default is 0
+# Default is 1024 (no change)
 #
 #textmode 2
 
index f134101902a8d6bd718cf7af306063ab9dfc74d6..c7564c6dc9432aedbe19d5cb454ddc09d4b682ed 100644 (file)
@@ -105,7 +105,7 @@ static REFIT_MENU_SCREEN MainMenu       = { L"Main Menu", NULL, 0, NULL, 0, NULL
                                             L"Insert or F2 for more options; Esc to refresh" };
 static REFIT_MENU_SCREEN AboutMenu      = { L"About", NULL, 0, NULL, 0, NULL, 0, NULL, L"Press Enter to return to main menu", L"" };
 
-REFIT_CONFIG GlobalConfig = { FALSE, FALSE, 0, 0, 0, 20, 0, 0, GRAPHICS_FOR_OSX, LEGACY_TYPE_MAC, 0,
+REFIT_CONFIG GlobalConfig = { FALSE, FALSE, 0, 0, DONT_CHANGE_TEXT_MODE, 20, 0, 0, GRAPHICS_FOR_OSX, LEGACY_TYPE_MAC, 0,
                               NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
                               {TAG_SHELL, TAG_APPLE_RECOVERY, TAG_MOK_TOOL, TAG_ABOUT, TAG_SHUTDOWN, TAG_REBOOT, 0, 0, 0, 0, 0 }};
 
@@ -127,7 +127,7 @@ static VOID AboutrEFInd(VOID)
 
     if (AboutMenu.EntryCount == 0) {
         AboutMenu.TitleImage = BuiltinIcon(BUILTIN_ICON_FUNC_ABOUT);
-        AddMenuInfoLine(&AboutMenu, L"rEFInd Version 0.6.1");
+        AddMenuInfoLine(&AboutMenu, L"rEFInd Version 0.6.1.1");
         AddMenuInfoLine(&AboutMenu, L"");
         AddMenuInfoLine(&AboutMenu, L"Copyright (c) 2006-2010 Christoph Pfisterer");
         AddMenuInfoLine(&AboutMenu, L"Copyright (c) 2012 Roderick W. Smith");
index 7f279dbc8d6ceb62fcb797ee8d34fef754375913..14a43eddde07950c26b0f403a4e45a21da7bb360 100644 (file)
@@ -154,7 +154,7 @@ VOID SetupScreen(VOID)
     }
 
     if (GlobalConfig.RequestedScreenWidth > 0) {
-       egSetScreenSize(&GlobalConfig.RequestedScreenWidth, &GlobalConfig.RequestedScreenHeight);
+       egSetScreenSize(&(GlobalConfig.RequestedScreenWidth), &(GlobalConfig.RequestedScreenHeight));
        egGetScreenSize(&UGAWidth, &UGAHeight);
     } // if user requested a particular screen resolution
 
index b03f6e17d4922555aeacfff73dc78bfe88ddaf6b..3fc089f663441d331c3169264cb7fb747916a539 100644 (file)
@@ -50,6 +50,8 @@
 // screen module
 //
 
+#define DONT_CHANGE_TEXT_MODE 1024 /* textmode # that's a code to not change the text mode */
+
 #define ATTR_BASIC (EFI_LIGHTGRAY | EFI_BACKGROUND_BLACK)
 #define ATTR_ERROR (EFI_YELLOW | EFI_BACKGROUND_BLACK)
 #define ATTR_BANNER (EFI_WHITE | EFI_BACKGROUND_BLUE)