summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Universal/SetupBrowserDxe/InputHandler.c
diff options
context:
space:
mode:
authorxdu2 <xdu2@6f19259b-4bc3-4df7-8a09-765794883524>2009-10-26 03:03:47 +0000
committerxdu2 <xdu2@6f19259b-4bc3-4df7-8a09-765794883524>2009-10-26 03:03:47 +0000
commitd02847d3c09bd897934e71d54921e9a2c5baf596 (patch)
tree30996560878807083f3991848d60f09e8b0fbbda /MdeModulePkg/Universal/SetupBrowserDxe/InputHandler.c
parentd66e6c168749f686f3be04809923da74f153f340 (diff)
downloadedk2-platforms-d02847d3c09bd897934e71d54921e9a2c5baf596.tar.xz
Add support for newly defined VarStore type EFI_IFR_TYPE_UNDEFINED, EFI_IFR_TYPE_ACTION and EFI_IFR_TYPE_BUFFER in UEFI spec.
Note: with this update, the limitation for "OrderedList should use array of data type UINT8 as its storage" is removed; now OrderedList could use any data type (UINT8/UINT16/UINT32/UINT64) as its storage array. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9360 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Universal/SetupBrowserDxe/InputHandler.c')
-rw-r--r--MdeModulePkg/Universal/SetupBrowserDxe/InputHandler.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/MdeModulePkg/Universal/SetupBrowserDxe/InputHandler.c b/MdeModulePkg/Universal/SetupBrowserDxe/InputHandler.c
index cb45a0b580..bef096c0eb 100644
--- a/MdeModulePkg/Universal/SetupBrowserDxe/InputHandler.c
+++ b/MdeModulePkg/Universal/SetupBrowserDxe/InputHandler.c
@@ -1,7 +1,7 @@
/** @file
Implementation for handling user input from the User Interfaces.
-Copyright (c) 2004 - 2007, Intel Corporation
+Copyright (c) 2004 - 2009, Intel Corporation
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -707,6 +707,7 @@ GetSelectionInputPopUp (
LIST_ENTRY *Link;
BOOLEAN OrderedList;
UINT8 *ValueArray;
+ UINT8 ValueType;
EFI_HII_VALUE HiiValue;
EFI_HII_VALUE *HiiValueArray;
UINTN OptionCount;
@@ -717,6 +718,7 @@ GetSelectionInputPopUp (
DimensionsWidth = gScreenDimensions.RightColumn - gScreenDimensions.LeftColumn;
ValueArray = NULL;
+ ValueType = 0;
CurrentOption = NULL;
ShowDownArrow = FALSE;
ShowUpArrow = FALSE;
@@ -737,7 +739,7 @@ GetSelectionInputPopUp (
//
if (OrderedList) {
for (Index = 0; Index < Question->MaxContainers; Index++) {
- if (ValueArray[Index] == 0) {
+ if (GetArrayData (ValueArray, ValueType, Index) == 0) {
break;
}
}
@@ -763,8 +765,8 @@ GetSelectionInputPopUp (
Link = GetFirstNode (&Question->OptionListHead);
for (Index = 0; Index < OptionCount; Index++) {
if (OrderedList) {
- HiiValueArray[Index].Type = EFI_IFR_TYPE_NUM_SIZE_8;
- HiiValueArray[Index].Value.u8 = ValueArray[Index];
+ HiiValueArray[Index].Type = ValueType;
+ HiiValueArray[Index].Value.u64 = GetArrayData (ValueArray, ValueType, Index);
} else {
OneOfOption = QUESTION_OPTION_FROM_LINK (Link);
CopyMem (&HiiValueArray[Index], &OneOfOption->Value, sizeof (EFI_HII_VALUE));
@@ -1060,11 +1062,11 @@ TheKey:
// Restore link list order for orderedlist
//
if (OrderedList) {
- HiiValue.Type = EFI_IFR_TYPE_NUM_SIZE_8;
+ HiiValue.Type = ValueType;
HiiValue.Value.u64 = 0;
for (Index = 0; Index < Question->MaxContainers; Index++) {
- HiiValue.Value.u8 = ValueArray[Index];
- if (HiiValue.Value.u8 != 0) {
+ HiiValue.Value.u64 = GetArrayData (ValueArray, ValueType, Index);
+ if (HiiValue.Value.u64 == 0) {
break;
}
@@ -1097,7 +1099,7 @@ TheKey:
while (!IsNull (&Question->OptionListHead, Link)) {
OneOfOption = QUESTION_OPTION_FROM_LINK (Link);
- Question->BufferValue[Index] = OneOfOption->Value.Value.u8;
+ SetArrayData (ValueArray, ValueType, Index, OneOfOption->Value.Value.u64);
Index++;
if (Index > Question->MaxContainers) {