Skip to content

Commit 9a093ec

Browse files
committed
[FREELDR] Fix menu display on VMware
When drawing the menu, the boot options should not be overwritten, but when clearing the screen, everything needs to be drawn, otherwise there will be uninitialized characters at the bottom. See CORE-20014.
1 parent bcedb53 commit 9a093ec

File tree

15 files changed

+31
-25
lines changed

15 files changed

+31
-25
lines changed

boot/freeldr/freeldr/bootmgr.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -427,8 +427,8 @@ VOID RunLoader(VOID)
427427

428428
for (;;)
429429
{
430-
/* Redraw the backdrop */
431-
UiDrawBackdrop();
430+
/* Redraw the backdrop, but don't overwrite boot options */
431+
UiDrawBackdrop(UiGetScreenHeight() - 2);
432432

433433
/* Show the operating system list menu */
434434
if (!UiDisplayMenu("Please select the operating system to start:",

boot/freeldr/freeldr/include/ui.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ extern const PCSTR UiMonthNames[12];
5353

5454
BOOLEAN UiInitialize(BOOLEAN ShowUi); // Initialize User-Interface
5555
VOID UiUnInitialize(PCSTR BootText); // Un-initialize User-Interface
56-
VOID UiDrawBackdrop(VOID); // Fills the entire screen with a backdrop
56+
VOID UiDrawBackdrop(ULONG DrawHeight); // Fills the entire screen with a backdrop
5757
VOID UiFillArea(ULONG Left, ULONG Top, ULONG Right, ULONG Bottom, CHAR FillChar, UCHAR Attr /* Color Attributes */); // Fills the area specified with FillChar and Attr
5858
VOID UiDrawShadow(ULONG Left, ULONG Top, ULONG Right, ULONG Bottom); // Draws a shadow on the bottom and right sides of the area specified
5959
VOID UiDrawBox(ULONG Left, ULONG Top, ULONG Right, ULONG Bottom, UCHAR VertStyle, UCHAR HorzStyle, BOOLEAN Fill, BOOLEAN Shadow, UCHAR Attr); // Draws a box around the area specified
@@ -254,7 +254,7 @@ typedef struct tagUIVTBL
254254
BOOLEAN (*Initialize)(VOID);
255255
VOID (*UnInitialize)(VOID);
256256

257-
VOID (*DrawBackdrop)(VOID);
257+
VOID (*DrawBackdrop)(ULONG DrawHeight);
258258
VOID (*FillArea)(ULONG Left, ULONG Top, ULONG Right, ULONG Bottom, CHAR FillChar, UCHAR Attr);
259259
VOID (*DrawShadow)(ULONG Left, ULONG Top, ULONG Right, ULONG Bottom);
260260
VOID (*DrawBox)(ULONG Left, ULONG Top, ULONG Right, ULONG Bottom, UCHAR VertStyle, UCHAR HorzStyle, BOOLEAN Fill, BOOLEAN Shadow, UCHAR Attr);

boot/freeldr/freeldr/include/ui/minitui.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
/* Textual User Interface Functions ******************************************/
1212

13-
VOID MiniTuiDrawBackdrop(VOID);
13+
VOID MiniTuiDrawBackdrop(ULONG DrawHeight);
1414
VOID MiniTuiDrawStatusText(PCSTR StatusText);
1515

1616
VOID

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
BOOLEAN NoUiInitialize(VOID);
1414
VOID NoUiUnInitialize(VOID);
1515

16-
VOID NoUiDrawBackdrop(VOID);
16+
VOID NoUiDrawBackdrop(ULONG DrawHeight);
1717
VOID NoUiFillArea(ULONG Left, ULONG Top, ULONG Right, ULONG Bottom, CHAR FillChar, UCHAR Attr);
1818
VOID NoUiDrawShadow(ULONG Left, ULONG Top, ULONG Right, ULONG Bottom);
1919
VOID NoUiDrawBox(ULONG Left, ULONG Top, ULONG Right, ULONG Bottom, UCHAR VertStyle, UCHAR HorzStyle, BOOLEAN Fill, BOOLEAN Shadow, UCHAR Attr);

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ TuiTruncateStringEllipsis(
3737
BOOLEAN TuiInitialize(VOID); // Initialize User-Interface
3838
VOID TuiUnInitialize(VOID); // Un-initialize User-Interface
3939

40-
VOID TuiDrawBackdrop(VOID); // Fills the entire screen with a backdrop
40+
VOID TuiDrawBackdrop(ULONG DrawHeight); // Fills the entire screen with a backdrop
4141
VOID TuiFillArea(ULONG Left, ULONG Top, ULONG Right, ULONG Bottom, CHAR FillChar, UCHAR Attr /* Color Attributes */); // Fills the area specified with FillChar and Attr
4242
VOID TuiDrawShadow(ULONG Left, ULONG Top, ULONG Right, ULONG Bottom); // Draws a shadow on the bottom and right sides of the area specified
4343

boot/freeldr/freeldr/linuxboot.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ LoadAndBootLinux(
114114
else
115115
strcpy(LinuxBootDescription, "Loading Linux...");
116116

117-
UiDrawBackdrop();
117+
UiDrawBackdrop(UiGetScreenHeight());
118118
UiDrawStatusText(LinuxBootDescription);
119119
UiDrawProgressBarCenter(LinuxBootDescription);
120120

boot/freeldr/freeldr/ntldr/setupldr.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -531,7 +531,7 @@ LoadReactOSSetup(
531531
}
532532

533533
/* Let the user know we started loading */
534-
UiDrawBackdrop();
534+
UiDrawBackdrop(UiGetScreenHeight());
535535
UiDrawStatusText("Setup is loading...");
536536
UiDrawProgressBarCenter("Loading ReactOS Setup...");
537537

boot/freeldr/freeldr/ntldr/winldr.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1030,7 +1030,7 @@ LoadAndBootWindows(
10301030
}
10311031

10321032
/* Let the user know we started loading */
1033-
UiDrawBackdrop();
1033+
UiDrawBackdrop(UiGetScreenHeight());
10341034
UiDrawStatusText("Loading...");
10351035
UiDrawProgressBarCenter("Loading NT...");
10361036

boot/freeldr/freeldr/options.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ VOID DoOptionsMenu(IN OperatingSystemItem* OperatingSystem)
108108
}
109109

110110
/* Clear the backdrop */
111-
UiDrawBackdrop();
111+
UiDrawBackdrop(UiGetScreenHeight());
112112

113113
switch (SelectedMenuItem)
114114
{

boot/freeldr/freeldr/ui/directui.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ UiInitialize(IN BOOLEAN ShowUi)
3535
MachVideoGetDisplaySize(&UiScreenWidth, &UiScreenHeight, &Depth);
3636

3737
/* Clear the screen */
38-
UiDrawBackdrop();
38+
UiDrawBackdrop(UiGetScreenHeight());
3939
return TRUE;
4040
}
4141

@@ -47,7 +47,7 @@ UiUnInitialize(IN PCSTR BootText)
4747
}
4848

4949
VOID
50-
UiDrawBackdrop(VOID)
50+
UiDrawBackdrop(ULONG DrawHeight)
5151
{
5252
/* Clear the screen */
5353
MachVideoClearScreen(ATTR(COLOR_WHITE, COLOR_BLACK));

0 commit comments

Comments
 (0)