Author: hbelusca
Date: Wed Dec 26 01:40:18 2012
New Revision: 58008
URL:
http://svn.reactos.org/svn/reactos?rev=58008&view=rev
Log:
[FREELDR]
- Show the selected boot options as NTLDR does (in light blue under the "For
troubleshooting... press F8" message).- The different safe modes are now mutually
exclusive, as they must be.
- They can be coupled to the "boot logging", "vga mode" and
"debugging" modes, enlarging possibilities (contrary to NTLDR. However
you'll remark that these combinations are allowed when set with msconfig...).
- Since the safe modes come by default with boot logging, don't show "Boot
Logging" when one of the safe modes is selected, but instead show the corresponding
safe mode name.
- Modify the needed functions.
Modified:
trunk/reactos/boot/freeldr/freeldr/arch/i386/custom.c
trunk/reactos/boot/freeldr/freeldr/bootmgr.c
trunk/reactos/boot/freeldr/freeldr/include/options.h
trunk/reactos/boot/freeldr/freeldr/include/ui.h
trunk/reactos/boot/freeldr/freeldr/include/ui/gui.h
trunk/reactos/boot/freeldr/freeldr/include/ui/noui.h
trunk/reactos/boot/freeldr/freeldr/include/ui/tui.h
trunk/reactos/boot/freeldr/freeldr/options.c
trunk/reactos/boot/freeldr/freeldr/ui/directui.c
trunk/reactos/boot/freeldr/freeldr/ui/minitui.c
trunk/reactos/boot/freeldr/freeldr/ui/noui.c
trunk/reactos/boot/freeldr/freeldr/ui/tui.c
trunk/reactos/boot/freeldr/freeldr/ui/tuimenu.c
trunk/reactos/boot/freeldr/freeldr/ui/ui.c
Modified: trunk/reactos/boot/freeldr/freeldr/arch/i386/custom.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/arch/…
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/arch/i386/custom.c [iso-8859-1] (original)
+++ trunk/reactos/boot/freeldr/freeldr/arch/i386/custom.c [iso-8859-1] Wed Dec 26 01:40:18
2012
@@ -44,6 +44,7 @@
ULONG SelectedMenuItem;
if (!UiDisplayMenu("Please choose a boot method:", "",
+ FALSE,
CustomBootMenuList,
CustomBootMenuCount,
0, -1,
Modified: trunk/reactos/boot/freeldr/freeldr/bootmgr.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/bootm…
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/bootmgr.c [iso-8859-1] (original)
+++ trunk/reactos/boot/freeldr/freeldr/bootmgr.c [iso-8859-1] Wed Dec 26 01:40:18 2012
@@ -273,6 +273,7 @@
if (!UiDisplayMenu("Please select the operating system to start:",
"For troubleshooting and advanced startup options for "
"ReactOS, press F8.",
+ TRUE,
OperatingSystemDisplayNames,
OperatingSystemCount,
DefaultOperatingSystem,
Modified: trunk/reactos/boot/freeldr/freeldr/include/options.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/inclu…
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/include/options.h [iso-8859-1] (original)
+++ trunk/reactos/boot/freeldr/freeldr/include/options.h [iso-8859-1] Wed Dec 26 01:40:18
2012
@@ -20,4 +20,5 @@
#pragma once
VOID DoOptionsMenu(VOID);
+VOID DisplayBootTimeOptions(VOID);
VOID AppendBootTimeOptions(PCHAR BootOptions);
Modified: trunk/reactos/boot/freeldr/freeldr/include/ui.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/inclu…
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/include/ui.h [iso-8859-1] (original)
+++ trunk/reactos/boot/freeldr/freeldr/include/ui.h [iso-8859-1] Wed Dec 26 01:40:18 2012
@@ -70,7 +70,7 @@
VOID UiDrawProgressBarCenter(ULONG Position, ULONG Range, PCHAR ProgressText); // Draws
the progress bar showing nPos percent filled
VOID UiDrawProgressBar(ULONG Left, ULONG Top, ULONG Right, ULONG Bottom, ULONG Position,
ULONG Range, PCHAR ProgressText); // Draws the progress bar showing nPos percent filled
VOID UiShowMessageBoxesInSection(PCSTR SectionName); // Displays all the message boxes
in a given section
-VOID UiEscapeString(PCHAR String); // Processes a string and changes all occurances
of "\n" to '\n'
+VOID UiEscapeString(PCHAR String); // Processes a string and changes all
occurrences of "\n" to '\n'
BOOLEAN UiEditBox(PCSTR MessageText, PCHAR EditTextBuffer, ULONG Length);
UCHAR UiTextToColor(PCSTR ColorText); // Converts the text color into it's
equivalent color value
@@ -91,8 +91,9 @@
{
PCSTR MenuHeader;
PCSTR MenuFooter;
+ BOOLEAN ShowBootOptions;
- PCSTR *MenuItemList;
+ PCSTR* MenuItemList;
ULONG MenuItemCount;
LONG MenuTimeRemaining;
ULONG SelectedMenuItem;
@@ -105,7 +106,7 @@
typedef BOOLEAN (*UiMenuKeyPressFilterCallback)(ULONG KeyPress);
-BOOLEAN UiDisplayMenu(PCSTR MenuHeader, PCSTR MenuFooter, PCSTR MenuItemList[], ULONG
MenuItemCount, ULONG DefaultMenuItem, LONG MenuTimeOut, ULONG* SelectedMenuItem, BOOLEAN
CanEscape, UiMenuKeyPressFilterCallback KeyPressFilter);
+BOOLEAN UiDisplayMenu(PCSTR MenuHeader, PCSTR MenuFooter, BOOLEAN ShowBootOptions, PCSTR
MenuItemList[], ULONG MenuItemCount, ULONG DefaultMenuItem, LONG MenuTimeOut, ULONG*
SelectedMenuItem, BOOLEAN CanEscape, UiMenuKeyPressFilterCallback KeyPressFilter);
///////////////////////////////////////////////////////////////////////////////////////
//
@@ -135,7 +136,7 @@
VOID (*FadeInBackdrop)(VOID);
VOID (*FadeOut)(VOID);
- BOOLEAN (*DisplayMenu)(PCSTR MenuHeader, PCSTR MenuFooter, PCSTR MenuItemList[], ULONG
MenuItemCount, ULONG DefaultMenuItem, LONG MenuTimeOut, ULONG* SelectedMenuItem, BOOLEAN
CanEscape, UiMenuKeyPressFilterCallback KeyPressFilter);
+ BOOLEAN (*DisplayMenu)(PCSTR MenuHeader, PCSTR MenuFooter, BOOLEAN ShowBootOptions,
PCSTR MenuItemList[], ULONG MenuItemCount, ULONG DefaultMenuItem, LONG MenuTimeOut, ULONG*
SelectedMenuItem, BOOLEAN CanEscape, UiMenuKeyPressFilterCallback KeyPressFilter);
VOID (*DrawMenu)(PUI_MENU_INFO MenuInfo);
} UIVTBL, *PUIVTBL;
Modified: trunk/reactos/boot/freeldr/freeldr/include/ui/gui.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/inclu…
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/include/ui/gui.h [iso-8859-1] (original)
+++ trunk/reactos/boot/freeldr/freeldr/include/ui/gui.h [iso-8859-1] Wed Dec 26 01:40:18
2012
@@ -48,6 +48,6 @@
// Menu Functions
//
///////////////////////////////////////////////////////////////////////////////////////
-BOOLEAN GuiDisplayMenu(PCSTR MenuHeader, PCSTR MenuFooter, PCSTR MenuItemList[], ULONG
MenuItemCount, ULONG DefaultMenuItem, LONG MenuTimeOut, ULONG* SelectedMenuItem);
+BOOLEAN GuiDisplayMenu(PCSTR MenuHeader, PCSTR MenuFooter, BOOLEAN ShowBootOptions, PCSTR
MenuItemList[], ULONG MenuItemCount, ULONG DefaultMenuItem, LONG MenuTimeOut, ULONG*
SelectedMenuItem);
extern const UIVTBL GuiVtbl;
Modified: trunk/reactos/boot/freeldr/freeldr/include/ui/noui.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/inclu…
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/include/ui/noui.h [iso-8859-1] (original)
+++ trunk/reactos/boot/freeldr/freeldr/include/ui/noui.h [iso-8859-1] Wed Dec 26 01:40:18
2012
@@ -41,5 +41,5 @@
//
///////////////////////////////////////////////////////////////////////////////////////
-BOOLEAN NoUiDisplayMenu(PCSTR MenuHeader, PCSTR MenuFooter, PCSTR MenuItemList[], ULONG
MenuItemCount, ULONG DefaultMenuItem, LONG MenuTimeOut, ULONG* SelectedMenuItem, BOOLEAN
CanEscape, UiMenuKeyPressFilterCallback KeyPressFilter);
+BOOLEAN NoUiDisplayMenu(PCSTR MenuHeader, PCSTR MenuFooter, BOOLEAN ShowBootOptions,
PCSTR MenuItemList[], ULONG MenuItemCount, ULONG DefaultMenuItem, LONG MenuTimeOut, ULONG*
SelectedMenuItem, BOOLEAN CanEscape, UiMenuKeyPressFilterCallback KeyPressFilter);
VOID NoUiDrawMenu(PUI_MENU_INFO MenuInfo);
Modified: trunk/reactos/boot/freeldr/freeldr/include/ui/tui.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/inclu…
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/include/ui/tui.h [iso-8859-1] (original)
+++ trunk/reactos/boot/freeldr/freeldr/include/ui/tui.h [iso-8859-1] Wed Dec 26 01:40:18
2012
@@ -63,7 +63,7 @@
VOID NTAPI TuiDrawMenuBox(PUI_MENU_INFO MenuInfo);
VOID NTAPI TuiDrawMenuItem(PUI_MENU_INFO MenuInfo, ULONG MenuItemNumber);
ULONG NTAPI TuiProcessMenuKeyboardEvent(PUI_MENU_INFO MenuInfo,
UiMenuKeyPressFilterCallback KeyPressFilter);
-BOOLEAN TuiDisplayMenu(PCSTR MenuHeader, PCSTR MenuFooter, PCSTR MenuItemList[], ULONG
MenuItemCount, ULONG DefaultMenuItem, LONG MenuTimeOut, ULONG* SelectedMenuItem, BOOLEAN
CanEscape, UiMenuKeyPressFilterCallback KeyPressFilter);
+BOOLEAN TuiDisplayMenu(PCSTR MenuHeader, PCSTR MenuFooter, BOOLEAN ShowBootOptions, PCSTR
MenuItemList[], ULONG MenuItemCount, ULONG DefaultMenuItem, LONG MenuTimeOut, ULONG*
SelectedMenuItem, BOOLEAN CanEscape, UiMenuKeyPressFilterCallback KeyPressFilter);
/* Definitions for corners, depending on HORIZ and VERT */
#define UL (0xda)
Modified: trunk/reactos/boot/freeldr/freeldr/options.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/optio…
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/options.c [iso-8859-1] (original)
+++ trunk/reactos/boot/freeldr/freeldr/options.c [iso-8859-1] Wed Dec 26 01:40:18 2012
@@ -37,6 +37,7 @@
NULL,
+ "Start ReactOS normally",
#ifdef HAS_OPTION_MENU_CUSTOM_BOOT
"Custom Boot",
#endif
@@ -60,41 +61,27 @@
" +peloader\n"
"NOTE: all letters must be lowercase, no spaces allowed.";
-enum OptionMenuItems
-{
- SAFE_MODE = 0,
- SAFE_MODE_WITH_NETWORKING = 1,
- SAFE_MODE_WITH_COMMAND_PROMPT = 2,
-
- SEPARATOR1 = 3,
-
- ENABLE_BOOT_LOGGING = 4,
- ENABLE_VGA_MODE = 5,
- LAST_KNOWN_GOOD_CONFIGURATION = 6,
- DIRECTORY_SERVICES_RESTORE_MODE = 7,
- DEBUGGING_MODE = 8,
- FREELDR_DEBUGGING = 9,
-
- SEPARATOR2 = 10,
-
-#ifdef HAS_OPTION_MENU_CUSTOM_BOOT
- CUSTOM_BOOT = 11,
-#endif
-#ifdef HAS_OPTION_MENU_REBOOT
- REBOOT = 12,
-#endif
+//
+// The boot options are mutually exclusive.
+//
+enum BootOption
+{
+ NO_OPTION = 0,
+
+ SAFE_MODE,
+ SAFE_MODE_WITH_NETWORKING,
+ SAFE_MODE_WITH_COMMAND_PROMPT,
+
+ LAST_KNOWN_GOOD_CONFIGURATION,
+ DIRECTORY_SERVICES_RESTORE_MODE,
};
ULONG OptionsMenuItemCount = sizeof(OptionsMenuList) / sizeof(OptionsMenuList[0]);
-BOOLEAN SafeMode = FALSE;
-BOOLEAN SafeModeWithNetworking = FALSE;
-BOOLEAN SafeModeWithCommandPrompt = FALSE;
-BOOLEAN BootLogging = FALSE;
-BOOLEAN VgaMode = FALSE;
-BOOLEAN LastKnownGoodConfiguration = FALSE;
-BOOLEAN DirectoryServicesRepairMode = FALSE;
-BOOLEAN DebuggingMode = FALSE;
+static enum BootOption BootOptionChoice = NO_OPTION;
+static BOOLEAN BootLogging = FALSE;
+static BOOLEAN VgaMode = FALSE;
+static BOOLEAN DebuggingMode = FALSE;
VOID DoOptionsMenu(VOID)
{
@@ -102,6 +89,7 @@
CHAR DebugChannelString[100];
if (!UiDisplayMenu("Select an option:", "",
+ TRUE,
OptionsMenuList,
OptionsMenuItemCount,
0, -1,
@@ -118,77 +106,170 @@
switch (SelectedMenuItem)
{
- case SAFE_MODE:
- SafeMode = TRUE;
- BootLogging = TRUE;
- break;
- case SAFE_MODE_WITH_NETWORKING:
- SafeModeWithNetworking = TRUE;
- BootLogging = TRUE;
- break;
- case SAFE_MODE_WITH_COMMAND_PROMPT:
- SafeModeWithCommandPrompt = TRUE;
- BootLogging = TRUE;
- break;
- //case SEPARATOR1:
- // break;
- case ENABLE_BOOT_LOGGING:
- BootLogging = TRUE;
- break;
- case ENABLE_VGA_MODE:
- VgaMode = TRUE;
- break;
- case LAST_KNOWN_GOOD_CONFIGURATION:
- LastKnownGoodConfiguration = TRUE;
- break;
- case DIRECTORY_SERVICES_RESTORE_MODE:
- DirectoryServicesRepairMode = TRUE;
- break;
- case DEBUGGING_MODE:
- DebuggingMode = TRUE;
- break;
- case FREELDR_DEBUGGING:
- DebugChannelString[0]=0;
- if (UiEditBox(FrldrDbgMsg, DebugChannelString, 100))
- DbgParseDebugChannels(DebugChannelString);
- break;
- //case SEPARATOR2:
- // break;
+ case 0: // Safe Mode
+ BootOptionChoice = SAFE_MODE;
+ BootLogging = TRUE;
+ break;
+ case 1: // Safe Mode with Networking
+ BootOptionChoice = SAFE_MODE_WITH_NETWORKING;
+ BootLogging = TRUE;
+ break;
+ case 2: // Safe Mode with Command Prompt
+ BootOptionChoice = SAFE_MODE_WITH_COMMAND_PROMPT;
+ BootLogging = TRUE;
+ break;
+ // case 3: // Separator
+ // break;
+ case 4: // Enable Boot Logging
+ BootLogging = TRUE;
+ break;
+ case 5: // Enable VGA Mode
+ VgaMode = TRUE;
+ break;
+ case 6: // Last Known Good Configuration
+ BootOptionChoice = LAST_KNOWN_GOOD_CONFIGURATION;
+ break;
+ case 7: // Directory Services Restore Mode
+ BootOptionChoice = DIRECTORY_SERVICES_RESTORE_MODE;
+ break;
+ case 8: // Debugging Mode
+ DebuggingMode = TRUE;
+ break;
+ case 9: // FreeLdr debugging
+ DebugChannelString[0] = 0;
+ if (UiEditBox(FrldrDbgMsg,
+ DebugChannelString,
+ sizeof(DebugChannelString) / sizeof(DebugChannelString[0])))
+ {
+ DbgParseDebugChannels(DebugChannelString);
+ }
+ break;
+ // case 10: // Separator
+ // break;
+ case 11: // Start ReactOS normally
+ // Reset all the parameters to their default values.
+ BootOptionChoice = NO_OPTION;
+ BootLogging = FALSE;
+ VgaMode = FALSE;
+ DebuggingMode = FALSE;
+ break;
#ifdef HAS_OPTION_MENU_CUSTOM_BOOT
- case CUSTOM_BOOT:
- OptionMenuCustomBoot();
- break;
+ case 12: // Custom Boot
+ OptionMenuCustomBoot();
+ break;
#endif
#ifdef HAS_OPTION_MENU_REBOOT
- case REBOOT:
- OptionMenuReboot();
- break;
+ case 13: // Reboot
+ OptionMenuReboot();
+ break;
#endif
}
}
+VOID DisplayBootTimeOptions(VOID)
+{
+ CHAR BootOptions[260] = "";
+
+ switch (BootOptionChoice)
+ {
+ case SAFE_MODE:
+ strcat(BootOptions, OptionsMenuList[0]);
+ break;
+
+ case SAFE_MODE_WITH_NETWORKING:
+ strcat(BootOptions, OptionsMenuList[1]);
+ break;
+
+ case SAFE_MODE_WITH_COMMAND_PROMPT:
+ strcat(BootOptions, OptionsMenuList[2]);
+ break;
+
+ case LAST_KNOWN_GOOD_CONFIGURATION:
+ strcat(BootOptions, OptionsMenuList[6]);
+ break;
+
+ case DIRECTORY_SERVICES_RESTORE_MODE:
+ strcat(BootOptions, OptionsMenuList[7]);
+ break;
+
+ default:
+ break;
+ }
+
+ if (BootLogging)
+ {
+ if ( (BootOptionChoice != SAFE_MODE) &&
+ (BootOptionChoice != SAFE_MODE_WITH_NETWORKING) &&
+ (BootOptionChoice != SAFE_MODE_WITH_COMMAND_PROMPT) )
+ {
+ if (BootOptionChoice != NO_OPTION)
+ {
+ strcat(BootOptions, ", ");
+ }
+ strcat(BootOptions, OptionsMenuList[4]);
+ }
+ }
+
+ if (VgaMode)
+ {
+ if ((BootOptionChoice != NO_OPTION) ||
+ BootLogging)
+ {
+ strcat(BootOptions, ", ");
+ }
+ strcat(BootOptions, OptionsMenuList[5]);
+ }
+
+ if (DebuggingMode)
+ {
+ if ((BootOptionChoice != NO_OPTION) ||
+ BootLogging || VgaMode)
+ {
+ strcat(BootOptions, ", ");
+ }
+ strcat(BootOptions, OptionsMenuList[8]);
+ }
+
+ /* Display the chosen boot options */
+ UiDrawText(0,
+ UiScreenHeight - 2,
+ BootOptions,
+ ATTR(COLOR_LIGHTBLUE, UiMenuBgColor));
+}
+
VOID AppendBootTimeOptions(PCHAR BootOptions)
{
- if (SafeMode)
- strcat(BootOptions, " /SAFEBOOT:MINIMAL /SOS"); //FIXME: NOGUIBOOT should
also be specified
-
- if (SafeModeWithNetworking)
- strcat(BootOptions, " /SAFEBOOT:NETWORK /SOS"); //FIXME: NOGUIBOOT should
also be specified
-
- if (SafeModeWithCommandPrompt)
- strcat(BootOptions, " /SAFEBOOT:MINIMAL(ALTERNATESHELL) /SOS"); //FIXME:
NOGUIBOOT should also be specified
+ switch (BootOptionChoice)
+ {
+ case SAFE_MODE:
+ strcat(BootOptions, " /SAFEBOOT:MINIMAL /SOS"); //FIXME: NOGUIBOOT should
also be specified
+ break;
+
+ case SAFE_MODE_WITH_NETWORKING:
+ strcat(BootOptions, " /SAFEBOOT:NETWORK /SOS"); //FIXME: NOGUIBOOT should
also be specified
+ break;
+
+ case SAFE_MODE_WITH_COMMAND_PROMPT:
+ strcat(BootOptions, " /SAFEBOOT:MINIMAL(ALTERNATESHELL) /SOS"); //FIXME:
NOGUIBOOT should also be specified
+ break;
+
+ case LAST_KNOWN_GOOD_CONFIGURATION:
+ DbgPrint("Last known good configuration is not supported yet!\n");
+ break;
+
+ case DIRECTORY_SERVICES_RESTORE_MODE:
+ strcat(BootOptions, " /SAFEBOOT:DSREPAIR /SOS");
+ break;
+
+ default:
+ break;
+ }
if (BootLogging)
strcat(BootOptions, " /BOOTLOG");
if (VgaMode)
strcat(BootOptions, " /BASEVIDEO");
-
- if (LastKnownGoodConfiguration)
- DbgPrint("Last known good configuration is not supported yet!\n");
-
- if (DirectoryServicesRepairMode)
- strcat(BootOptions, " /SAFEBOOT:DSREPAIR /SOS");
if (DebuggingMode)
strcat(BootOptions, " /DEBUG");
Modified: trunk/reactos/boot/freeldr/freeldr/ui/directui.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/ui/di…
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/ui/directui.c [iso-8859-1] (original)
+++ trunk/reactos/boot/freeldr/freeldr/ui/directui.c [iso-8859-1] Wed Dec 26 01:40:18
2012
@@ -384,6 +384,12 @@
{
UiDrawMenuItem(MenuInfo, i);
}
+
+ /* Display the boot options if needed */
+ if (MenuInfo->ShowBootOptions)
+ {
+ DisplayBootTimeOptions();
+ }
}
ULONG
@@ -502,6 +508,7 @@
BOOLEAN
UiDisplayMenu(IN PCSTR MenuHeader,
IN PCSTR MenuFooter,
+ IN BOOLEAN ShowBootOptions,
IN PCSTR MenuItemList[],
IN ULONG MenuItemCount,
IN ULONG DefaultMenuItem,
@@ -526,6 +533,7 @@
/* Setup the MENU_INFO structure */
MenuInformation.MenuHeader = MenuHeader;
MenuInformation.MenuFooter = MenuFooter;
+ MenuInformation.ShowBootOptions = ShowBootOptions;
MenuInformation.MenuItemList = MenuItemList;
MenuInformation.MenuItemCount = MenuItemCount;
MenuInformation.MenuTimeRemaining = MenuTimeOut;
Modified: trunk/reactos/boot/freeldr/freeldr/ui/minitui.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/ui/mi…
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/ui/minitui.c [iso-8859-1] (original)
+++ trunk/reactos/boot/freeldr/freeldr/ui/minitui.c [iso-8859-1] Wed Dec 26 01:40:18 2012
@@ -123,6 +123,14 @@
TuiDrawMenuItem(MenuInfo, i);
}
+ //
+ // Display the boot options if needed
+ //
+ if (MenuInfo->ShowBootOptions)
+ {
+ DisplayBootTimeOptions();
+ }
+
VideoCopyOffScreenBufferToVRAM();
}
Modified: trunk/reactos/boot/freeldr/freeldr/ui/noui.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/ui/no…
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/ui/noui.c [iso-8859-1] (original)
+++ trunk/reactos/boot/freeldr/freeldr/ui/noui.c [iso-8859-1] Wed Dec 26 01:40:18 2012
@@ -109,7 +109,7 @@
//
///////////////////////////////////////////////////////////////////////////////////////
-BOOLEAN NoUiDisplayMenu(PCSTR MenuHeader, PCSTR MenuFooter, PCSTR MenuItemList[], ULONG
MenuItemCount, ULONG DefaultMenuItem, LONG MenuTimeOut, ULONG* SelectedMenuItem, BOOLEAN
CanEscape, UiMenuKeyPressFilterCallback KeyPressFilter)
+BOOLEAN NoUiDisplayMenu(PCSTR MenuHeader, PCSTR MenuFooter, BOOLEAN ShowBootOptions,
PCSTR MenuItemList[], ULONG MenuItemCount, ULONG DefaultMenuItem, LONG MenuTimeOut, ULONG*
SelectedMenuItem, BOOLEAN CanEscape, UiMenuKeyPressFilterCallback KeyPressFilter)
{
*SelectedMenuItem = DefaultMenuItem;
return TRUE;
Modified: trunk/reactos/boot/freeldr/freeldr/ui/tui.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/ui/tu…
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/ui/tui.c [iso-8859-1] (original)
+++ trunk/reactos/boot/freeldr/freeldr/ui/tui.c [iso-8859-1] Wed Dec 26 01:40:18 2012
@@ -128,7 +128,7 @@
//
// Draw title text
//
- TuiDrawText( (UiScreenWidth / 2) - ((ULONG)strlen(UiTitleBoxTitleText) / 2),
+ TuiDrawText( (UiScreenWidth - (ULONG)strlen(UiTitleBoxTitleText)) / 2,
2,
UiTitleBoxTitleText,
ATTR(UiTitleBoxFgColor, UiTitleBoxBgColor));
Modified: trunk/reactos/boot/freeldr/freeldr/ui/tuimenu.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/ui/tu…
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/ui/tuimenu.c [iso-8859-1] (original)
+++ trunk/reactos/boot/freeldr/freeldr/ui/tuimenu.c [iso-8859-1] Wed Dec 26 01:40:18 2012
@@ -16,6 +16,7 @@
BOOLEAN
TuiDisplayMenu(PCSTR MenuHeader,
PCSTR MenuFooter,
+ BOOLEAN ShowBootOptions,
PCSTR MenuItemList[],
ULONG MenuItemCount,
ULONG DefaultMenuItem,
@@ -45,6 +46,7 @@
//
MenuInformation.MenuHeader = MenuHeader;
MenuInformation.MenuFooter = MenuFooter;
+ MenuInformation.ShowBootOptions = ShowBootOptions;
MenuInformation.MenuItemList = MenuItemList;
MenuInformation.MenuItemCount = MenuItemCount;
MenuInformation.MenuTimeRemaining = MenuTimeOut;
@@ -223,6 +225,12 @@
for (i = 0; i < MenuInfo->MenuItemCount; i++)
{
TuiDrawMenuItem(MenuInfo, i);
+ }
+
+ /* Display the boot options if needed */
+ if (MenuInfo->ShowBootOptions)
+ {
+ DisplayBootTimeOptions();
}
VideoCopyOffScreenBufferToVRAM();
Modified: trunk/reactos/boot/freeldr/freeldr/ui/ui.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/ui/ui…
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/ui/ui.c [iso-8859-1] (original)
+++ trunk/reactos/boot/freeldr/freeldr/ui/ui.c [iso-8859-1] Wed Dec 26 01:40:18 2012
@@ -442,9 +442,9 @@
}
}
-BOOLEAN UiDisplayMenu(PCSTR MenuHeader, PCSTR MenuFooter, PCSTR MenuItemList[], ULONG
MenuItemCount, ULONG DefaultMenuItem, LONG MenuTimeOut, ULONG* SelectedMenuItem, BOOLEAN
CanEscape, UiMenuKeyPressFilterCallback KeyPressFilter)
-{
- return UiVtbl.DisplayMenu(MenuHeader, MenuFooter, MenuItemList, MenuItemCount,
DefaultMenuItem, MenuTimeOut, SelectedMenuItem, CanEscape, KeyPressFilter);
+BOOLEAN UiDisplayMenu(PCSTR MenuHeader, PCSTR MenuFooter, BOOLEAN ShowBootOptions, PCSTR
MenuItemList[], ULONG MenuItemCount, ULONG DefaultMenuItem, LONG MenuTimeOut, ULONG*
SelectedMenuItem, BOOLEAN CanEscape, UiMenuKeyPressFilterCallback KeyPressFilter)
+{
+ return UiVtbl.DisplayMenu(MenuHeader, MenuFooter, ShowBootOptions, MenuItemList,
MenuItemCount, DefaultMenuItem, MenuTimeOut, SelectedMenuItem, CanEscape,
KeyPressFilter);
}
VOID UiFadeInBackdrop(VOID)