Commit in freeldr/freeldr on MAIN
bootmgr.c+11-41.10 -> 1.11
include/ui.h+1-11.6 -> 1.7
ui/ui.c+17-11.9 -> 1.10
+29-6
3 modified files
Freeldr will not load a UI if Timeout = 0, and will instead immediately load the default OS.

freeldr/freeldr
bootmgr.c 1.10 -> 1.11
diff -u -r1.10 -r1.11
--- bootmgr.c	14 Nov 2004 22:04:38 -0000	1.10
+++ bootmgr.c	16 Dec 2004 07:09:33 -0000	1.11
@@ -37,7 +37,6 @@
 #include <cmdline.h>
 #include <machine.h>
 
-
 VOID RunLoader(VOID)
 {
 	UCHAR	SettingName[80];
@@ -63,13 +62,15 @@
 		MachConsGetCh();
 		return;
 	}
+	TimeOut = GetTimeOut();
 
-	if (!UiInitialize())
+	if (!UiInitialize(TimeOut))
 	{
 		printf("Press any key to reboot.\n");
 		MachConsGetCh();
 		return;
 	}
+	
 
 	if (!InitOperatingSystemList(&OperatingSystemSectionNames, &OperatingSystemDisplayNames, &OperatingSystemCount))
 	{
@@ -84,7 +85,6 @@
 	}
 
 	DefaultOperatingSystem = GetDefaultOperatingSystem(OperatingSystemSectionNames, OperatingSystemCount);
-	TimeOut = GetTimeOut();
 	
 	//
 	// Find all the message box settings and run them
@@ -93,6 +93,12 @@
 
 	for (;;)
 	{
+	
+		/* If Timeout is 0, don't even bother loading any gui */
+		if (!UserInterfaceUp) {
+			goto NoGui;
+		}
+		
 		// Redraw the backdrop
 		UiDrawBackdrop();
 
@@ -102,6 +108,8 @@
 			UiMessageBox("Press ENTER to reboot.\n");
 			goto reboot;
 		}
+		
+NoGui:
 		TimeOut = -1;
 		DefaultOperatingSystem = SelectedOperatingSystem;
 
@@ -123,7 +131,6 @@
 
 		// Install the drive mapper according to this sections drive mappings
 		DriveMapMapDrivesInSection(OperatingSystemSectionNames[SelectedOperatingSystem]);
-
 		if (stricmp(SettingValue, "ReactOS") == 0)
 		{
 			LoadAndBootReactOS(OperatingSystemSectionNames[SelectedOperatingSystem]);

freeldr/freeldr/include
ui.h 1.6 -> 1.7
diff -u -r1.6 -r1.7
--- ui.h	19 Jan 2003 01:03:59 -0000	1.6
+++ ui.h	16 Dec 2004 07:09:33 -0000	1.7
@@ -54,7 +54,7 @@
 // User Interface Functions
 //
 ///////////////////////////////////////////////////////////////////////////////////////
-BOOL	UiInitialize(VOID);										// Initialize User-Interface
+BOOL	UiInitialize(BOOLEAN ShowGui);								// Initialize User-Interface
 VOID	UiUnInitialize(PUCHAR BootText);						// Un-initialize User-Interface
 VOID	UiDrawBackdrop(VOID);									// Fills the entire screen with a backdrop
 VOID	UiFillArea(U32 Left, U32 Top, U32 Right, U32 Bottom, UCHAR FillChar, UCHAR Attr /* Color Attributes */);	// Fills the area specified with FillChar and Attr

freeldr/freeldr/ui
ui.c 1.9 -> 1.10
diff -u -r1.9 -r1.10
--- ui.c	14 Nov 2004 22:04:39 -0000	1.9
+++ ui.c	16 Dec 2004 07:09:33 -0000	1.10
@@ -59,13 +59,23 @@
 UCHAR	UiMonthNames[12][15] = { "January ", "February ", "March ", "April ", "May ", "June ", "July ", "August ", "September ", "October ", "November ", "December " };
 
 
-BOOL UiInitialize(VOID)
+BOOL UiInitialize(BOOLEAN ShowGui)
 {
 	U32	SectionId;
 	UCHAR	DisplayModeText[260];
 	UCHAR	SettingText[260];
 	U32	Depth;
 
+	if (!ShowGui) {
+		if (!TuiInitialize())
+		{
+			MachVideoSetDisplayMode(NULL, FALSE);
+			return FALSE;
+		}
+		UserInterfaceUp = FALSE;
+		return TRUE;
+	}
+	
 	DbgPrint((DPRINT_UI, "Initializing User Interface.\n"));
 
 	DbgPrint((DPRINT_UI, "Reading in UI settings from [Display] section.\n"));
@@ -210,6 +220,8 @@
 
 VOID UiDrawBackdrop(VOID)
 {
+	if (!UserInterfaceUp) return;
+	
 	if (VideoTextMode == UiDisplayMode)
 	{
 		TuiDrawBackdrop();
@@ -288,6 +300,8 @@
 
 VOID UiDrawStatusText(PUCHAR StatusText)
 {
+	if (!UserInterfaceUp) return;
+	
 	if (VideoTextMode == UiDisplayMode)
 	{
 		TuiDrawStatusText(StatusText);
@@ -453,6 +467,8 @@
 
 VOID UiDrawProgressBarCenter(U32 Position, U32 Range, PUCHAR ProgressText)
 {
+	if (!UserInterfaceUp) return;
+	
 	if (VideoTextMode == UiDisplayMode)
 	{
 		TuiDrawProgressBarCenter(Position, Range, ProgressText);
CVSspam 0.2.8