From dcca4870cd81fdf8fe5596cd48a9c3bb8757b3f8 Mon Sep 17 00:00:00 2001 From: Rafal Kupiec Date: Thu, 28 Mar 2024 14:06:52 +0100 Subject: [PATCH] Move cursor before changing console attributes --- xtldr/textui.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/xtldr/textui.c b/xtldr/textui.c index e433885..edf960f 100644 --- a/xtldr/textui.c +++ b/xtldr/textui.c @@ -894,6 +894,9 @@ BlpDrawBootMenuEntry(IN PXTBL_DIALOG_HANDLE Handle, { UINT Index; + /* Move cursor to the right position */ + BlSetCursorPosition(5, 4 + Position); + /* Check whether this entry should be highlighted */ if(Highlighted) { @@ -906,9 +909,6 @@ BlpDrawBootMenuEntry(IN PXTBL_DIALOG_HANDLE Handle, BlSetConsoleAttributes(EFI_TEXT_BGCOLOR_BLACK | EFI_TEXT_FGCOLOR_LIGHTGRAY); } - /* Move cursor to the right position */ - BlSetCursorPosition(5, 4 + Position); - /* Clear menu entry */ for(Index = 0; Index < Handle->Width - 4; Index++) {