mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 01:55:19 +00:00
bug fix: use the requested default os when timeout is 0 instead of defaulting to the first OS in the list.
svn path=/trunk/; revision=13344
This commit is contained in:
parent
4b5d785258
commit
d2f23650e6
1 changed files with 9 additions and 9 deletions
|
@ -16,7 +16,7 @@
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program; if not, write to the Free Software
|
||||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <freeldr.h>
|
#include <freeldr.h>
|
||||||
#include <rtl.h>
|
#include <rtl.h>
|
||||||
#include <fs.h>
|
#include <fs.h>
|
||||||
|
@ -70,14 +70,14 @@ VOID RunLoader(VOID)
|
||||||
MachConsGetCh();
|
MachConsGetCh();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (!InitOperatingSystemList(&OperatingSystemSectionNames, &OperatingSystemDisplayNames, &OperatingSystemCount))
|
if (!InitOperatingSystemList(&OperatingSystemSectionNames, &OperatingSystemDisplayNames, &OperatingSystemCount))
|
||||||
{
|
{
|
||||||
UiMessageBox("Press ENTER to reboot.\n");
|
UiMessageBox("Press ENTER to reboot.\n");
|
||||||
goto reboot;
|
goto reboot;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (OperatingSystemCount == 0)
|
if (OperatingSystemCount == 0)
|
||||||
{
|
{
|
||||||
UiMessageBox("There were no operating systems listed in freeldr.ini.\nPress ENTER to reboot.");
|
UiMessageBox("There were no operating systems listed in freeldr.ini.\nPress ENTER to reboot.");
|
||||||
|
@ -85,7 +85,7 @@ VOID RunLoader(VOID)
|
||||||
}
|
}
|
||||||
|
|
||||||
DefaultOperatingSystem = GetDefaultOperatingSystem(OperatingSystemSectionNames, OperatingSystemCount);
|
DefaultOperatingSystem = GetDefaultOperatingSystem(OperatingSystemSectionNames, OperatingSystemCount);
|
||||||
|
|
||||||
//
|
//
|
||||||
// Find all the message box settings and run them
|
// Find all the message box settings and run them
|
||||||
//
|
//
|
||||||
|
@ -93,12 +93,13 @@ VOID RunLoader(VOID)
|
||||||
|
|
||||||
for (;;)
|
for (;;)
|
||||||
{
|
{
|
||||||
|
|
||||||
/* If Timeout is 0, don't even bother loading any gui */
|
/* If Timeout is 0, don't even bother loading any gui */
|
||||||
if (!UserInterfaceUp) {
|
if (!UserInterfaceUp) {
|
||||||
|
SelectedOperatingSystem = DefaultOperatingSystem;
|
||||||
goto NoGui;
|
goto NoGui;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Redraw the backdrop
|
// Redraw the backdrop
|
||||||
UiDrawBackdrop();
|
UiDrawBackdrop();
|
||||||
|
|
||||||
|
@ -108,10 +109,9 @@ VOID RunLoader(VOID)
|
||||||
UiMessageBox("Press ENTER to reboot.\n");
|
UiMessageBox("Press ENTER to reboot.\n");
|
||||||
goto reboot;
|
goto reboot;
|
||||||
}
|
}
|
||||||
|
|
||||||
NoGui:
|
NoGui:
|
||||||
TimeOut = -1;
|
TimeOut = -1;
|
||||||
DefaultOperatingSystem = SelectedOperatingSystem;
|
|
||||||
|
|
||||||
// Try to open the operating system section in the .ini file
|
// Try to open the operating system section in the .ini file
|
||||||
if (!IniOpenSection(OperatingSystemSectionNames[SelectedOperatingSystem], &SectionId))
|
if (!IniOpenSection(OperatingSystemSectionNames[SelectedOperatingSystem], &SectionId))
|
||||||
|
@ -153,7 +153,7 @@ NoGui:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
reboot:
|
reboot:
|
||||||
UiUnInitialize("Rebooting...");
|
UiUnInitialize("Rebooting...");
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in a new issue