summaryrefslogtreecommitdiffstats
path: root/MdeModulePkg
diff options
context:
space:
mode:
authorAbdul Lateef Attar <abdul@marvell.com>2020-04-20 15:05:55 +0800
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2020-06-10 03:26:43 +0000
commit9b52b06f964226780b7047e10be0c1a65e223eb1 (patch)
tree088e1edbedf7559872bc2621030ecaf32b4a5624 /MdeModulePkg
parentdafce295e6f447ed8905db4e29241e2c6c2a4389 (diff)
downloadedk2-9b52b06f964226780b7047e10be0c1a65e223eb1.tar.gz
edk2-9b52b06f964226780b7047e10be0c1a65e223eb1.tar.bz2
edk2-9b52b06f964226780b7047e10be0c1a65e223eb1.zip
MdeModulePkg: Sets the Cursor to selected BootOption.
Its been observed that in MenuManagerMenuApp when user selects a different BootOption using Up/Down key, the current Cursor position is not chaning. Still points to the old BootOption. This changes first dispalys/redraws the old BootOption followed by new BootOption. Doing so will make current cursor pointing to the user selected BootOption. Signed-off-by: Abdul Lateef Attar <abdul@marvell.com> Reviewed-by: Dandan Bi <dandan.bi@intel.com>
Diffstat (limited to 'MdeModulePkg')
-rw-r--r--MdeModulePkg/Application/BootManagerMenuApp/BootManagerMenu.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/MdeModulePkg/Application/BootManagerMenuApp/BootManagerMenu.c b/MdeModulePkg/Application/BootManagerMenuApp/BootManagerMenu.c
index 34d4089a55..9e729074ec 100644
--- a/MdeModulePkg/Application/BootManagerMenuApp/BootManagerMenu.c
+++ b/MdeModulePkg/Application/BootManagerMenuApp/BootManagerMenu.c
@@ -451,20 +451,10 @@ BootMenuSelectItem (
}
//
- // Print want to select item
- //
- FirstItem = BootMenuData->ScrollBarControl.FirstItem;
- gST->ConOut->SetAttribute (gST->ConOut, EFI_WHITE | EFI_BACKGROUND_BLACK);
- String = HiiGetString (gStringPackHandle, BootMenuData->PtrTokens[WantSelectItem], NULL);
- PrintCol = StartCol + 1;
- PrintRow = StartRow + TITLE_TOKEN_COUNT + 2 + WantSelectItem - FirstItem;
- PrintStringAt (PrintCol, PrintRow, String);
- FreePool (String);
-
- //
// if Want Select and selected item isn't the same and doesn't re-draw selectable
// items, clear select item
//
+ FirstItem = BootMenuData->ScrollBarControl.FirstItem;
if (WantSelectItem != BootMenuData->SelectItem && !RePaintItems) {
gST->ConOut->SetAttribute (gST->ConOut, EFI_WHITE | EFI_BACKGROUND_BLUE);
String = HiiGetString (gStringPackHandle, BootMenuData->PtrTokens[BootMenuData->SelectItem], NULL);
@@ -474,6 +464,16 @@ BootMenuSelectItem (
FreePool (String);
}
+ //
+ // Print want to select item
+ //
+ gST->ConOut->SetAttribute (gST->ConOut, EFI_WHITE | EFI_BACKGROUND_BLACK);
+ String = HiiGetString (gStringPackHandle, BootMenuData->PtrTokens[WantSelectItem], NULL);
+ PrintCol = StartCol + 1;
+ PrintRow = StartRow + TITLE_TOKEN_COUNT + 2 + WantSelectItem - FirstItem;
+ PrintStringAt (PrintCol, PrintRow, String);
+ FreePool (String);
+
gST->ConOut->SetAttribute (gST->ConOut, SavedAttribute);
BootMenuData->SelectItem = WantSelectItem;
return EFI_SUCCESS;