@@ -85,7 +85,7 @@ WarnDeprecated(
8585 CHAR msgString [300 ];
8686
8787 /* If the user didn't cancel the timeout, don't display the warning */
88- if (BootMgrInfo . TimeOut >= 0 )
88+ if (GetBootMgrInfo () -> TimeOut >= 0 )
8989 return ;
9090
9191 va_start (ap , MsgFmt );
@@ -183,6 +183,7 @@ BuildArgvForOsLoader(
183183 PCHAR * Argv ;
184184 PCHAR * Args ;
185185 PCHAR SettingName , SettingValue ;
186+ PCCHAR BootPath = FrLdrGetBootPath ();
186187
187188 * pArgc = 0 ;
188189
@@ -208,7 +209,7 @@ BuildArgvForOsLoader(
208209 /* i == 0: Program name */
209210 // TODO: Provide one in the future...
210211 /* i == 1: SystemPartition : from where FreeLdr has been started */
211- Size += (strlen ("SystemPartition=" ) + strlen (FrLdrBootPath ) + 1 ) * sizeof (CHAR );
212+ Size += (strlen ("SystemPartition=" ) + strlen (BootPath ) + 1 ) * sizeof (CHAR );
212213 /* i == 2: LoadIdentifier : ASCII string that may be used
213214 * to associate an identifier with a set of load parameters */
214215 if (LoadIdentifier )
@@ -236,7 +237,7 @@ BuildArgvForOsLoader(
236237 /* i == 1: SystemPartition */
237238 {
238239 strcpy (SettingName , "SystemPartition=" );
239- strcat (SettingName , FrLdrBootPath );
240+ strcat (SettingName , BootPath );
240241
241242 * Args ++ = SettingName ;
242243 SettingName += (strlen (SettingName ) + 1 );
@@ -333,12 +334,13 @@ MainBootMenuKeyPressFilter(
333334 IN PVOID Context OPTIONAL )
334335{
335336 /* Any key-press cancels the global timeout */
336- BootMgrInfo . TimeOut = -1 ;
337+ GetBootMgrInfo () -> TimeOut = -1 ;
337338
338339 switch (KeyPress )
339340 {
340341 case KEY_F8 :
341342 DoOptionsMenu (& ((OperatingSystemItem * )Context )[SelectedMenuItem ]);
343+ DisplayBootTimeOptions ();
342344 return TRUE;
343345
344346#ifdef HAS_OPTION_MENU_EDIT_CMDLINE
@@ -362,12 +364,6 @@ VOID RunLoader(VOID)
362364 ULONG SelectedOperatingSystem ;
363365 ULONG i ;
364366
365- if (!MachInitializeBootDevices ())
366- {
367- UiMessageBoxCritical ("Error when detecting hardware." );
368- return ;
369- }
370-
371367#ifdef _M_IX86
372368#ifndef UEFIBOOT
373369 /* Load additional SCSI driver (if any) */
@@ -394,7 +390,7 @@ VOID RunLoader(VOID)
394390#endif
395391
396392 /* Debugger main initialization */
397- DebugInit (BootMgrInfo . DebugString );
393+ DebugInit (GetBootMgrInfo () -> DebugString );
398394
399395 /* UI main initialization */
400396 if (!UiInitialize (TRUE))
@@ -427,7 +423,7 @@ VOID RunLoader(VOID)
427423 }
428424
429425 /* Find all the message box settings and run them */
430- UiShowMessageBoxesInSection (BootMgrInfo . FrLdrSection );
426+ UiShowMessageBoxesInSection (GetBootMgrInfo () -> FrLdrSection );
431427
432428 for (;;)
433429 {
@@ -438,11 +434,10 @@ VOID RunLoader(VOID)
438434 if (!UiDisplayMenu ("Please select the operating system to start:" ,
439435 "For troubleshooting and advanced startup options for "
440436 "ReactOS, press F8." ,
441- TRUE,
442437 OperatingSystemDisplayNames ,
443438 OperatingSystemCount ,
444439 DefaultOperatingSystem ,
445- BootMgrInfo . TimeOut ,
440+ GetBootMgrInfo () -> TimeOut ,
446441 & SelectedOperatingSystem ,
447442 FALSE,
448443 MainBootMenuKeyPressFilter ,
@@ -455,12 +450,12 @@ VOID RunLoader(VOID)
455450 /* Load the chosen operating system */
456451 LoadOperatingSystem (& OperatingSystemList [SelectedOperatingSystem ]);
457452
458- BootMgrInfo . TimeOut = -1 ;
453+ GetBootMgrInfo () -> TimeOut = -1 ;
459454
460455 /* If we get there, the OS loader failed. As it may have
461456 * messed up the display, re-initialize the UI. */
462457#ifndef _M_ARM
463- UiVtbl . UnInitialize ( );
458+ UiUnInitialize ( "" );
464459#endif
465460 UiInitialize (TRUE);
466461 }
0 commit comments