mirror of https://github.com/acidanthera/audk.git
Merged in the bug fixes from EDK I.
*** Press F9 in Uefi64 FrontPage shouldnot enter sub-menu ** [FT] Some UI error on multiple platforms on framework_20080811 ** [FT] UI test of How tall are you(Hex) on framework_20080811 To improve backward compatibility, add gEfiPrint2ProtocolGuid and rename gEfiPrintProtocolGuid to the previous GUID value used in EDK I. gEfiPrint2ProtocolGuid is a enhanced version of gEfiPrintProtocolGuid. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5768 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
08e6463a72
commit
ebe43565f9
|
@ -687,7 +687,10 @@ IsExpressionOpCode (
|
|||
{
|
||||
if (((Operand >= EFI_IFR_EQ_ID_VAL_OP) && (Operand <= EFI_IFR_NOT_OP)) ||
|
||||
((Operand >= EFI_IFR_MATCH_OP) && (Operand <= EFI_IFR_SPAN_OP)) ||
|
||||
(Operand == EFI_IFR_CATENATE_OP)
|
||||
(Operand == EFI_IFR_CATENATE_OP) ||
|
||||
(Operand == EFI_IFR_TO_LOWER_OP) ||
|
||||
(Operand == EFI_IFR_TO_UPPER_OP) ||
|
||||
(Operand == EFI_IFR_VERSION_OP)
|
||||
) {
|
||||
return TRUE;
|
||||
} else {
|
||||
|
|
|
@ -597,6 +597,7 @@ InitializeBrowserStrings (
|
|||
gPlusString = GetToken (STRING_TOKEN (PLUS_STRING), gHiiHandle);
|
||||
gMinusString = GetToken (STRING_TOKEN (MINUS_STRING), gHiiHandle);
|
||||
gAdjustNumber = GetToken (STRING_TOKEN (ADJUST_NUMBER), gHiiHandle);
|
||||
gSaveChanges = GetToken (STRING_TOKEN (SAVE_CHANGES), gHiiHandle);
|
||||
return ;
|
||||
}
|
||||
|
||||
|
@ -637,6 +638,7 @@ FreeBrowserStrings (
|
|||
SafeFreePool (gPlusString);
|
||||
SafeFreePool (gMinusString);
|
||||
SafeFreePool (gAdjustNumber);
|
||||
SafeFreePool (gSaveChanges);
|
||||
return ;
|
||||
}
|
||||
|
||||
|
@ -857,6 +859,9 @@ SetupBrowser (
|
|||
EFI_HII_VALUE *HiiValue;
|
||||
FORM_BROWSER_STATEMENT *Statement;
|
||||
EFI_HII_CONFIG_ACCESS_PROTOCOL *ConfigAccess;
|
||||
EFI_INPUT_KEY Key;
|
||||
CHAR16 YesResponse;
|
||||
CHAR16 NoResponse;
|
||||
|
||||
gMenuRefreshHead = NULL;
|
||||
gResetRequired = FALSE;
|
||||
|
@ -990,6 +995,32 @@ SetupBrowser (
|
|||
// Force to reparse IFR binary of target Formset
|
||||
//
|
||||
Selection->Action = UI_ACTION_REFRESH_FORMSET;
|
||||
|
||||
//
|
||||
// Uncommitted data will be lost after IFR binary re-pasing, so confirm on whether to save
|
||||
//
|
||||
if (gNvUpdateRequired) {
|
||||
Status = gST->ConIn->ReadKeyStroke (gST->ConIn, &Key);
|
||||
|
||||
YesResponse = gYesResponse[0];
|
||||
NoResponse = gNoResponse[0];
|
||||
|
||||
do {
|
||||
CreateDialog (3, TRUE, 0, NULL, &Key, gEmptyString, gSaveChanges, gEmptyString);
|
||||
} while
|
||||
(
|
||||
(Key.ScanCode != SCAN_ESC) &&
|
||||
((Key.UnicodeChar | UPPER_LOWER_CASE_OFFSET) != (NoResponse | UPPER_LOWER_CASE_OFFSET)) &&
|
||||
((Key.UnicodeChar | UPPER_LOWER_CASE_OFFSET) != (YesResponse | UPPER_LOWER_CASE_OFFSET))
|
||||
);
|
||||
|
||||
if ((Key.UnicodeChar | UPPER_LOWER_CASE_OFFSET) == (YesResponse | UPPER_LOWER_CASE_OFFSET)) {
|
||||
//
|
||||
// If the user hits the YesResponse key
|
||||
//
|
||||
SubmitForm (Selection->FormSet, Selection->Form);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} while (Selection->Action == UI_ACTION_REFRESH_FORM);
|
||||
|
|
|
@ -328,6 +328,7 @@ ProcessOptions (
|
|||
//
|
||||
// Initialize Option value array
|
||||
//
|
||||
|
||||
if (Question->BufferValue[0] == 0) {
|
||||
GetQuestionDefault (Selection->FormSet, Selection->Form, Question, 0);
|
||||
}
|
||||
|
|
|
@ -24,7 +24,12 @@ SETUP_DRIVER_PRIVATE_DATA mPrivateData = {
|
|||
BrowserCallback
|
||||
},
|
||||
{
|
||||
UnicodeVSPrint
|
||||
UnicodeVSPrint,
|
||||
UnicodeVSPrintAsciiFormat,
|
||||
UnicodeValueToString,
|
||||
AsciiVSPrint,
|
||||
AsciiVSPrintUnicodeFormat,
|
||||
AsciiValueToString
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -39,7 +44,6 @@ UINTN gFunctionKeySetting;
|
|||
BOOLEAN gResetRequired;
|
||||
BOOLEAN gNvUpdateRequired;
|
||||
EFI_HII_HANDLE gHiiHandle;
|
||||
BOOLEAN gFirstIn;
|
||||
UINT16 gDirection;
|
||||
EFI_SCREEN_DESCRIPTOR gScreenDimensions;
|
||||
BOOLEAN gUpArrow;
|
||||
|
@ -76,6 +80,7 @@ CHAR16 *gMiniString;
|
|||
CHAR16 *gPlusString;
|
||||
CHAR16 *gMinusString;
|
||||
CHAR16 *gAdjustNumber;
|
||||
CHAR16 *gSaveChanges;
|
||||
|
||||
CHAR16 gPromptBlockWidth;
|
||||
CHAR16 gOptionBlockWidth;
|
||||
|
@ -274,11 +279,8 @@ SendForm (
|
|||
//
|
||||
// Ensure we are in Text mode
|
||||
//
|
||||
if (gFirstIn) {
|
||||
gFirstIn = FALSE;
|
||||
gST->ConOut->SetAttribute (gST->ConOut, EFI_TEXT_ATTR (EFI_LIGHTGRAY, EFI_BLACK));
|
||||
DisableQuietBoot ();
|
||||
}
|
||||
gST->ConOut->SetAttribute (gST->ConOut, EFI_TEXT_ATTR (EFI_LIGHTGRAY, EFI_BLACK));
|
||||
DisableQuietBoot ();
|
||||
|
||||
for (Index = 0; Index < HandleCount; Index++) {
|
||||
Selection = AllocateZeroPool (sizeof (UI_MENU_SELECTION));
|
||||
|
@ -576,7 +578,6 @@ InitializeSetup (
|
|||
//
|
||||
// Initialize Driver private data
|
||||
//
|
||||
gFirstIn = TRUE;
|
||||
BannerData = AllocateZeroPool (sizeof (BANNER_DATA));
|
||||
ASSERT (BannerData != NULL);
|
||||
|
||||
|
@ -595,6 +596,19 @@ InitializeSetup (
|
|||
//
|
||||
// Install Print protocol
|
||||
//
|
||||
Status = gBS->InstallProtocolInterface (
|
||||
&mPrivateData.Handle,
|
||||
&gEfiPrint2ProtocolGuid,
|
||||
EFI_NATIVE_INTERFACE,
|
||||
&mPrivateData.Print
|
||||
);
|
||||
|
||||
//
|
||||
// Install Ecp Print protocol, which is defined in
|
||||
// Edk\Foundation\Protocol\Print\Print.h with protocol
|
||||
// GUID of { 0xdf2d868e, 0x32fc, 0x4cf0, {0x8e, 0x6b, 0xff, 0xd9, 0x5d, 0x13, 0x43, 0xd0 }}
|
||||
// This is support previous module that written to consume this protocol.
|
||||
//
|
||||
Status = gBS->InstallProtocolInterface (
|
||||
&mPrivateData.Handle,
|
||||
&gEfiPrintProtocolGuid,
|
||||
|
|
|
@ -20,6 +20,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
|||
#include <Uefi.h>
|
||||
|
||||
#include <Protocol/Print.h>
|
||||
#include <Protocol/Print2.h>
|
||||
#include <Protocol/SimpleTextOut.h>
|
||||
#include <Protocol/SimpleTextIn.h>
|
||||
#include <Protocol/FormBrowser2.h>
|
||||
|
@ -172,7 +173,7 @@ typedef struct {
|
|||
// Produced protocol
|
||||
//
|
||||
EFI_FORM_BROWSER2_PROTOCOL FormBrowser2;
|
||||
EFI_PRINT_PROTOCOL Print;
|
||||
EFI_PRINT2_PROTOCOL Print;
|
||||
|
||||
} SETUP_DRIVER_PRIVATE_DATA;
|
||||
|
||||
|
@ -454,7 +455,6 @@ extern UINTN gFunctionKeySetting;
|
|||
extern BOOLEAN gResetRequired;
|
||||
extern BOOLEAN gNvUpdateRequired;
|
||||
extern EFI_HII_HANDLE gHiiHandle;
|
||||
extern BOOLEAN gFirstIn;
|
||||
extern UINT16 gDirection;
|
||||
extern EFI_SCREEN_DESCRIPTOR gScreenDimensions;
|
||||
extern BOOLEAN gUpArrow;
|
||||
|
@ -491,6 +491,7 @@ extern CHAR16 *gMiniString;
|
|||
extern CHAR16 *gPlusString;
|
||||
extern CHAR16 *gMinusString;
|
||||
extern CHAR16 *gAdjustNumber;
|
||||
extern CHAR16 *gSaveChanges;
|
||||
|
||||
extern CHAR16 gPromptBlockWidth;
|
||||
extern CHAR16 gOptionBlockWidth;
|
||||
|
|
|
@ -69,6 +69,7 @@
|
|||
|
||||
[Protocols]
|
||||
gEfiPrintProtocolGuid # PROTOCOL ALWAYS_PRODUCED
|
||||
gEfiPrint2ProtocolGuid
|
||||
gEfiHiiConfigAccessProtocolGuid
|
||||
gEfiHiiStringProtocolGuid
|
||||
gEfiFormBrowser2ProtocolGuid
|
||||
|
|
Binary file not shown.
|
@ -2828,6 +2828,7 @@ UiDisplayMenu (
|
|||
|
||||
if (!EFI_ERROR (Status)) {
|
||||
Selection->Action = UI_ACTION_REFRESH_FORM;
|
||||
Selection->Statement = NULL;
|
||||
|
||||
//
|
||||
// Show NV update flag on status bar
|
||||
|
|
Loading…
Reference in New Issue