summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Universal/SetupBrowserDxe/Setup.c
diff options
context:
space:
mode:
authorEric Dong <eric.dong@intel.com>2013-08-12 04:49:48 +0000
committerydong10 <ydong10@6f19259b-4bc3-4df7-8a09-765794883524>2013-08-12 04:49:48 +0000
commit5a9f73bf065eda6b830445dc907e778f4a13d8d7 (patch)
tree7fb5573ec7e6840bc285d4b6ac82568a8c73e6b8 /MdeModulePkg/Universal/SetupBrowserDxe/Setup.c
parent6b1ac44423a02a03e084215e148c577f0244304b (diff)
Refine the code logic for browser and display engine.
Signed-off-by: Eric Dong <eric.dong@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14543 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Universal/SetupBrowserDxe/Setup.c')
-rw-r--r--MdeModulePkg/Universal/SetupBrowserDxe/Setup.c25
1 files changed, 12 insertions, 13 deletions
diff --git a/MdeModulePkg/Universal/SetupBrowserDxe/Setup.c b/MdeModulePkg/Universal/SetupBrowserDxe/Setup.c
index c4dd18a04f..ba72d1220b 100644
--- a/MdeModulePkg/Universal/SetupBrowserDxe/Setup.c
+++ b/MdeModulePkg/Universal/SetupBrowserDxe/Setup.c
@@ -46,7 +46,7 @@ UINTN gBrowserContextCount = 0;
LIST_ENTRY gBrowserContextList = INITIALIZE_LIST_HEAD_VARIABLE (gBrowserContextList);
LIST_ENTRY gBrowserFormSetList = INITIALIZE_LIST_HEAD_VARIABLE (gBrowserFormSetList);
LIST_ENTRY gBrowserHotKeyList = INITIALIZE_LIST_HEAD_VARIABLE (gBrowserHotKeyList);
-LIST_ENTRY gBrowserStorageList = INITIALIZE_LIST_HEAD_VARIABLE (gBrowserStorageList);
+LIST_ENTRY gBrowserStorageList = INITIALIZE_LIST_HEAD_VARIABLE (gBrowserStorageList);
BOOLEAN gResetRequired;
BOOLEAN gExitRequired;
@@ -58,17 +58,15 @@ EXIT_HANDLER ExitHandlerFunction = NULL;
// Browser Global Strings
//
CHAR16 *gEmptyString;
-
CHAR16 *mUnknownString = L"!";
EFI_GUID gZeroGuid = {0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}};
-EFI_GUID gSetupBrowserGuid = {
- 0xab368524, 0xb60c, 0x495b, {0xa0, 0x9, 0x12, 0xe8, 0x5b, 0x1a, 0xea, 0x32}
-};
-FORM_BROWSER_FORMSET *gOldFormSet = NULL;
-extern UINT32 gBrowserStatus;
-extern CHAR16 *gErrorInfo;
+extern UINT32 gBrowserStatus;
+extern CHAR16 *gErrorInfo;
+extern EFI_GUID mCurrentFormSetGuid;
+extern EFI_HII_HANDLE mCurrentHiiHandle;
+extern UINT16 mCurrentFormId;
extern FORM_DISPLAY_ENGINE_FORM gDisplayFormData;
/**
@@ -4612,11 +4610,6 @@ SaveBrowserContext (
return;
}
- //
- // Not support SendForm nest in another SendForm, assert here.
- //
- ASSERT (FALSE);
-
Context = AllocatePool (sizeof (BROWSER_CONTEXT));
ASSERT (Context != NULL);
@@ -4625,9 +4618,12 @@ SaveBrowserContext (
//
// Save FormBrowser context
//
+ Context->Selection = gCurrentSelection;
Context->ResetRequired = gResetRequired;
Context->ExitRequired = gExitRequired;
Context->HiiHandle = mCurrentHiiHandle;
+ Context->FormId = mCurrentFormId;
+ CopyGuid (&Context->FormSetGuid, &mCurrentFormSetGuid);
//
// Save the menu history data.
@@ -4677,9 +4673,12 @@ RestoreBrowserContext (
//
// Restore FormBrowser context
//
+ gCurrentSelection = Context->Selection;
gResetRequired = Context->ResetRequired;
gExitRequired = Context->ExitRequired;
mCurrentHiiHandle = Context->HiiHandle;
+ mCurrentFormId = Context->FormId;
+ CopyGuid (&mCurrentFormSetGuid, &Context->FormSetGuid);
//
// Restore the menu history data.