Skip to content

Commit ebcf3f2

Browse files
committed
[FREELDR] Remove ShowBootOptions from Menu code
This removes a dependency of UI code to boot options code by getting rid of a call to DisplayBootTimeOptions() from within the menu code. Instead this is now handled by MainBootMenuKeyPressFilter.
1 parent 9daef29 commit ebcf3f2

File tree

12 files changed

+4
-28
lines changed

12 files changed

+4
-28
lines changed

boot/freeldr/freeldr/bootmgr.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -340,6 +340,7 @@ MainBootMenuKeyPressFilter(
340340
{
341341
case KEY_F8:
342342
DoOptionsMenu(&((OperatingSystemItem*)Context)[SelectedMenuItem]);
343+
DisplayBootTimeOptions();
343344
return TRUE;
344345

345346
#ifdef HAS_OPTION_MENU_EDIT_CMDLINE
@@ -433,7 +434,6 @@ VOID RunLoader(VOID)
433434
if (!UiDisplayMenu("Please select the operating system to start:",
434435
"For troubleshooting and advanced startup options for "
435436
"ReactOS, press F8.",
436-
TRUE,
437437
OperatingSystemDisplayNames,
438438
OperatingSystemCount,
439439
DefaultOperatingSystem,

boot/freeldr/freeldr/custom.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,6 @@ VOID OptionMenuCustomBoot(VOID)
126126
OperatingSystemItem OperatingSystem;
127127

128128
if (!UiDisplayMenu("Please choose a boot method:", NULL,
129-
FALSE,
130129
CustomBootMenuList,
131130
RTL_NUMBER_OF(CustomBootMenuList),
132131
0, -1,

boot/freeldr/freeldr/include/ui.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,6 @@ typedef struct tagUI_MENU_INFO
211211
{
212212
PCSTR MenuHeader;
213213
PCSTR MenuFooter;
214-
BOOLEAN ShowBootOptions;
215214

216215
PCSTR* MenuItemList;
217216
ULONG MenuItemCount;
@@ -236,7 +235,6 @@ BOOLEAN
236235
UiDisplayMenu(
237236
IN PCSTR MenuHeader,
238237
IN PCSTR MenuFooter OPTIONAL,
239-
IN BOOLEAN ShowBootOptions,
240238
IN PCSTR MenuItemList[],
241239
IN ULONG MenuItemCount,
242240
IN ULONG DefaultMenuItem,
@@ -293,7 +291,6 @@ typedef struct tagUIVTBL
293291
BOOLEAN (*DisplayMenu)(
294292
IN PCSTR MenuHeader,
295293
IN PCSTR MenuFooter OPTIONAL,
296-
IN BOOLEAN ShowBootOptions,
297294
IN PCSTR MenuItemList[],
298295
IN ULONG MenuItemCount,
299296
IN ULONG DefaultMenuItem,

boot/freeldr/freeldr/include/ui/noui.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,6 @@ BOOLEAN
9393
NoUiDisplayMenu(
9494
IN PCSTR MenuHeader,
9595
IN PCSTR MenuFooter OPTIONAL,
96-
IN BOOLEAN ShowBootOptions,
9796
IN PCSTR MenuItemList[],
9897
IN ULONG MenuItemCount,
9998
IN ULONG DefaultMenuItem,

boot/freeldr/freeldr/include/ui/tui.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,6 @@ BOOLEAN
149149
TuiDisplayMenu(
150150
IN PCSTR MenuHeader,
151151
IN PCSTR MenuFooter OPTIONAL,
152-
IN BOOLEAN ShowBootOptions,
153152
IN PCSTR MenuItemList[],
154153
IN ULONG MenuItemCount,
155154
IN ULONG DefaultMenuItem,

boot/freeldr/freeldr/options.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,6 @@ VOID DoOptionsMenu(IN OperatingSystemItem* OperatingSystem)
9595
CHAR DebugChannelString[100];
9696

9797
if (!UiDisplayMenu("Select an option:", NULL,
98-
TRUE,
9998
OptionsMenuList,
10099
sizeof(OptionsMenuList) / sizeof(OptionsMenuList[0]),
101100
11, // Use "Start ReactOS normally" as default; see the switch below.

boot/freeldr/freeldr/ui/directui.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,6 @@ BOOLEAN
139139
UiDisplayMenu(
140140
IN PCSTR MenuHeader,
141141
IN PCSTR MenuFooter OPTIONAL,
142-
IN BOOLEAN ShowBootOptions,
143142
IN PCSTR MenuItemList[],
144143
IN ULONG MenuItemCount,
145144
IN ULONG DefaultMenuItem,

boot/freeldr/freeldr/ui/minitui.c

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ BOOLEAN MiniTuiInitialize(VOID)
5656
VOID MiniTuiDrawBackdrop(VOID)
5757
{
5858
/* Fill in a black background */
59-
TuiFillArea(0, 0, UiScreenWidth - 1, UiScreenHeight - 1,
59+
TuiFillArea(0, 0, UiScreenWidth - 1, UiScreenHeight - 3,
6060
UiBackdropFillStyle,
6161
ATTR(UiBackdropFgColor, UiBackdropBgColor));
6262

@@ -225,12 +225,6 @@ MiniTuiDrawMenu(
225225
ATTR(UiMenuFgColor, UiMenuBgColor));
226226
}
227227

228-
/* Display the boot options if needed */
229-
if (MenuInfo->ShowBootOptions)
230-
{
231-
DisplayBootTimeOptions();
232-
}
233-
234228
VideoCopyOffScreenBufferToVRAM();
235229
}
236230

boot/freeldr/freeldr/ui/noui.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,6 @@ BOOLEAN
163163
NoUiDisplayMenu(
164164
IN PCSTR MenuHeader,
165165
IN PCSTR MenuFooter OPTIONAL,
166-
IN BOOLEAN ShowBootOptions,
167166
IN PCSTR MenuItemList[],
168167
IN ULONG MenuItemCount,
169168
IN ULONG DefaultMenuItem,

boot/freeldr/freeldr/ui/tui.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ VOID TuiDrawBackdrop(VOID)
275275
TuiFillArea(0,
276276
TUI_TITLE_BOX_CHAR_HEIGHT,
277277
UiScreenWidth - 1,
278-
UiScreenHeight - 2,
278+
UiScreenHeight - 3,
279279
UiBackdropFillStyle,
280280
ATTR(UiBackdropFgColor, UiBackdropBgColor));
281281

0 commit comments

Comments
 (0)