]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/SetupBrowserDxe/Ui.c
MdeModulePkg: Fixed 'variable set but not used' build warning.
[mirror_edk2.git] / MdeModulePkg / Universal / SetupBrowserDxe / Ui.c
index 8ff90e144069102bcaf3966517ada72ce827e5e0..d54466e1230e65207c0499eb2d1d03e43e307c8f 100644 (file)
@@ -778,6 +778,9 @@ UiAddMenuOption (
     if ((Statement->ValueExpression != NULL) ||\r
         ((Statement->QuestionFlags & EFI_IFR_FLAG_READ_ONLY) != 0)) {\r
       MenuOption->ReadOnly = TRUE;\r
+      if (FeaturePcdGet (PcdBrowerGrayOutReadOnlyMenu)) {\r
+        MenuOption->GrayOut = TRUE;\r
+      }\r
     }\r
 \r
     InsertTailList (&gMenuOption, &MenuOption->Link);\r
@@ -3282,7 +3285,8 @@ UiDisplayMenu (
           // Check whether Key matches the registered hot key.\r
           //\r
           HotKey = NULL;\r
-          if ((gBrowserSettingScope == SystemLevel) || (gFunctionKeySetting != NONE_FUNCTION_KEY_SETTING)) {\r
+          if ((gBrowserSettingScope == SystemLevel) || \r
+              (Selection->FormEditable && gFunctionKeySetting != NONE_FUNCTION_KEY_SETTING)) {\r
             HotKey = GetHotKeyFromRegisterList (&Key);\r
           }\r
           if (HotKey != NULL) {\r