summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Universal/DisplayEngineDxe
diff options
context:
space:
mode:
Diffstat (limited to 'MdeModulePkg/Universal/DisplayEngineDxe')
-rw-r--r--MdeModulePkg/Universal/DisplayEngineDxe/FormDisplay.c31
-rw-r--r--MdeModulePkg/Universal/DisplayEngineDxe/FormDisplay.h4
-rw-r--r--MdeModulePkg/Universal/DisplayEngineDxe/InputHandler.c8
3 files changed, 21 insertions, 22 deletions
diff --git a/MdeModulePkg/Universal/DisplayEngineDxe/FormDisplay.c b/MdeModulePkg/Universal/DisplayEngineDxe/FormDisplay.c
index a7b7dc7..81020b2 100644
--- a/MdeModulePkg/Universal/DisplayEngineDxe/FormDisplay.c
+++ b/MdeModulePkg/Universal/DisplayEngineDxe/FormDisplay.c
@@ -2014,8 +2014,8 @@ FindTopMenu (
/**
Record the highlight menu and top of screen menu info.
- @param Highlight The menu opton which is highlight.
- @param TopOfScreen The menu opton which is at the top of the form.
+ @param Highlight The menu option which is highlight.
+ @param TopOfScreen The menu option which is at the top of the form.
@param SkipValue The skip line info for the top of screen menu.
**/
@@ -2095,9 +2095,9 @@ UpdateHighlightMenuInfo (
}
/**
- Update attribut for this menu.
+ Update attribute for this menu.
- @param MenuOption The menu opton which this attribut used to.
+ @param MenuOption The menu option which this attribute used to.
@param Highlight Whether this menu will be highlight.
**/
@@ -2130,7 +2130,7 @@ SetDisplayAttribute (
/**
Print string for this menu option.
- @param MenuOption The menu opton which this attribut used to.
+ @param MenuOption The menu option which this attribute used to.
@param Col The column that this string will be print at.
@param Row The row that this string will be print at.
@param String The string which need to print.
@@ -2164,19 +2164,20 @@ DisplayMenuString (
// First print the highlight string.
//
SetDisplayAttribute (MenuOption, TRUE);
- Length = PrintStringAt (Col, Row, String);
+ PrintStringAt (Col, Row, String);
//
// Second, clean the empty after the string.
//
SetDisplayAttribute (MenuOption, FALSE);
+ Length = GetStringWidth (String) / 2 - 1;
PrintStringAtWithWidth (Col + Length, Row, L"", Width - Length);
}
/**
Check whether this menu can has option string.
- @param MenuOption The menu opton which this attribut used to.
+ @param MenuOption The menu option which this attribute used to.
@retval TRUE This menu option can have option string.
@retval FALSE This menu option can't have option string.
@@ -2371,7 +2372,7 @@ FxConfirmPopup (
/**
Print string for this menu option.
- @param MenuOption The menu opton which this attribut used to.
+ @param MenuOption The menu option which this attribute used to.
@param SkipWidth The skip width between the left to the start of the prompt.
@param BeginCol The begin column for one menu.
@param SkipLine The skip line for this menu.
@@ -2379,7 +2380,7 @@ FxConfirmPopup (
@param Highlight Whether this menu will be highlight.
@param UpdateCol Whether need to update the column info for Date/Time.
- @retval EFI_SUCESSS Process the user selection success.
+ @retval EFI_SUCCESS Process the user selection success.
**/
EFI_STATUS
@@ -2626,7 +2627,7 @@ DisplayOneMenu (
@param FormData The current form data info.
- @retval EFI_SUCESSS Process the user selection success.
+ @retval EFI_SUCCESS Process the user selection success.
@retval EFI_NOT_FOUND Process option string for orderedlist/Oneof fail.
**/
@@ -2904,9 +2905,9 @@ UiDisplayMenu (
case CfRefreshHighLight:
//
- // MenuOption: Last menu option that need to remove hilight
+ // MenuOption: Last menu option that need to remove highlight
// MenuOption is set to NULL in Repaint
- // NewPos: Current menu option that need to hilight
+ // NewPos: Current menu option that need to highlight
//
ControlFlag = CfUpdateHelpString;
@@ -2986,13 +2987,13 @@ UiDisplayMenu (
}
//
- // NewLine means only update highlight menu (remove old highlight and highlith
- // the new one), not need to full repain the form.
+ // NewLine means only update highlight menu (remove old highlight and highlight
+ // the new one), not need to full repaint the form.
//
if (Repaint || NewLine) {
if (IsListEmpty (&gMenuOption)) {
//
- // Don't print anything if no mwnu option.
+ // Don't print anything if no menu option.
//
StringPtr = GetToken (STRING_TOKEN (EMPTY_STRING), gHiiHandle);
} else {
diff --git a/MdeModulePkg/Universal/DisplayEngineDxe/FormDisplay.h b/MdeModulePkg/Universal/DisplayEngineDxe/FormDisplay.h
index 6e26704..a7b15a8 100644
--- a/MdeModulePkg/Universal/DisplayEngineDxe/FormDisplay.h
+++ b/MdeModulePkg/Universal/DisplayEngineDxe/FormDisplay.h
@@ -696,8 +696,8 @@ RefreshTimeOutProcess (
/**
Record the highlight menu and top of screen menu info.
- @param Highlight The menu opton which is highlight.
- @param TopOfScreen The menu opton which is at the top of the form.
+ @param Highlight The menu option which is highlight.
+ @param TopOfScreen The menu option which is at the top of the form.
@param SkipValue The skip line info for the top of screen menu.
**/
diff --git a/MdeModulePkg/Universal/DisplayEngineDxe/InputHandler.c b/MdeModulePkg/Universal/DisplayEngineDxe/InputHandler.c
index b6dc234..b2a3ef6 100644
--- a/MdeModulePkg/Universal/DisplayEngineDxe/InputHandler.c
+++ b/MdeModulePkg/Universal/DisplayEngineDxe/InputHandler.c
@@ -229,8 +229,8 @@ ReadString (
case CHAR_BACKSPACE:
if ((StringPtr[0] != CHAR_NULL) && (CurrentCursor != 0)) {
- for (Index = 0; Index < CurrentCursor - 1; Index++) {
- TempString[Index] = StringPtr[Index];
+ if (CurrentCursor > 1) {
+ CopyMem (TempString, StringPtr, (CurrentCursor - 1) * sizeof (CHAR16));
}
Count = GetStringWidth (StringPtr) / 2 - 1;
@@ -261,9 +261,7 @@ ReadString (
KeyPad[1] = CHAR_NULL;
Count = GetStringWidth (StringPtr) / 2 - 1;
if (CurrentCursor < Count) {
- for (Index = 0; Index < CurrentCursor; Index++) {
- TempString[Index] = StringPtr[Index];
- }
+ CopyMem (TempString, StringPtr, CurrentCursor * sizeof (CHAR16));
TempString[Index] = CHAR_NULL;
StrCatS (TempString, MaxLen, KeyPad);