Changeset 58466 in vbox for trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/DisplayEngineDxe/InputHandler.c
- Timestamp:
- Oct 29, 2015 4:30:44 AM (9 years ago)
- Location:
- trunk/src/VBox/Devices/EFI/Firmware
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/EFI/Firmware
- Property svn:mergeinfo changed
/vendor/edk2/current merged: 103769-103776
- Property svn:mergeinfo changed
-
trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/DisplayEngineDxe/InputHandler.c
r58464 r58466 35 35 StringOp = (EFI_IFR_STRING *) OpCode; 36 36 *Minimum = StringOp->MinSize; 37 *Maximum = StringOp->MaxSize; 37 *Maximum = StringOp->MaxSize; 38 38 } else if (OpCode->OpCode == EFI_IFR_PASSWORD_OP) { 39 39 PasswordOp = (EFI_IFR_PASSWORD *) OpCode; 40 40 *Minimum = PasswordOp->MinSize; 41 *Maximum = PasswordOp->MaxSize; 41 *Maximum = PasswordOp->MaxSize; 42 42 } else { 43 43 *Minimum = 0; 44 *Maximum = 0; 44 *Maximum = 0; 45 45 } 46 46 } … … 159 159 PrintStringAt (Start + 1, Top + 3, BufferedString); 160 160 } 161 161 162 162 gST->ConOut->SetAttribute (gST->ConOut, EFI_TEXT_ATTR (EFI_LIGHTGRAY, EFI_BLACK)); 163 163 gST->ConOut->SetCursorPosition (gST->ConOut, Start + GetStringWidth (StringPtr) / 2, Top + 3); 164 164 } 165 165 166 166 do { 167 167 Status = WaitForKeyStroke (&Key); … … 354 354 } 355 355 } 356 356 357 357 // 358 358 // Change the Year area. … … 387 387 388 388 NumericOp = (EFI_IFR_NUMERIC *) OpCode; 389 389 390 390 switch (NumericOp->Flags & EFI_IFR_NUMERIC_SIZE) { 391 391 case EFI_IFR_NUMERIC_SIZE_1: … … 395 395 *StorageWidth = (UINT16) sizeof (UINT8); 396 396 break; 397 397 398 398 case EFI_IFR_NUMERIC_SIZE_2: 399 399 *Minimum = NumericOp->data.u16.MinValue; … … 402 402 *StorageWidth = (UINT16) sizeof (UINT16); 403 403 break; 404 404 405 405 case EFI_IFR_NUMERIC_SIZE_4: 406 406 *Minimum = NumericOp->data.u32.MinValue; … … 409 409 *StorageWidth = (UINT16) sizeof (UINT32); 410 410 break; 411 411 412 412 case EFI_IFR_NUMERIC_SIZE_8: 413 413 *Minimum = NumericOp->data.u64.MinValue; … … 416 416 *StorageWidth = (UINT16) sizeof (UINT64); 417 417 break; 418 418 419 419 default: 420 420 break; … … 509 509 switch (QuestionValue->Value.date.Month) { 510 510 case 2: 511 if ((QuestionValue->Value.date.Year % 4) == 0 && 512 ((QuestionValue->Value.date.Year % 100) != 0 || 511 if ((QuestionValue->Value.date.Year % 4) == 0 && 512 ((QuestionValue->Value.date.Year % 100) != 0 || 513 513 (QuestionValue->Value.date.Year % 400) == 0)) { 514 514 Maximum = 29; … … 526 526 Maximum = 31; 527 527 break; 528 } 528 } 529 529 530 530 EraseLen = 3; … … 816 816 UpdateStatusBar (INPUT_ERROR, FALSE); 817 817 } 818 818 819 819 CopyMem (&gUserInput->InputValue, &Question->CurrentValue, sizeof (EFI_HII_VALUE)); 820 820 QuestionValue = &gUserInput->InputValue; … … 868 868 // 2013.03.29 -> 2013.02.29 -> 2013.02.28 869 869 // 870 if (Question->OpCode->OpCode == EFI_IFR_DATE_OP && 870 if (Question->OpCode->OpCode == EFI_IFR_DATE_OP && 871 871 (MenuOption->Sequence == 0 || MenuOption->Sequence == 2)) { 872 872 AdjustQuestionValue (QuestionValue, (UINT8)MenuOption->Sequence); … … 992 992 } 993 993 } 994 994 995 995 *PopUpMenuLines = Index; 996 996 997 997 // 998 998 // Prepare HiiValue array 999 // 999 // 1000 1000 HiiValueArray = AllocateZeroPool (*PopUpMenuLines * sizeof (EFI_HII_VALUE)); 1001 1001 ASSERT (HiiValueArray != NULL); … … 1005 1005 HiiValueArray[Index].Value.u64 = GetArrayData (ValueArray, ValueType, Index); 1006 1006 } 1007 1007 1008 1008 for (Index = 0; Index < *PopUpMenuLines; Index++) { 1009 1009 OneOfOption = ValueToOption (Question, &HiiValueArray[*PopUpMenuLines - Index - 1]); … … 1011 1011 return EFI_NOT_FOUND; 1012 1012 } 1013 1013 1014 1014 RemoveEntryList (&OneOfOption->Link); 1015 1015 1016 1016 // 1017 1017 // Insert to head. … … 1019 1019 InsertHeadList (&Question->OptionListHead, &OneOfOption->Link); 1020 1020 } 1021 1021 1022 1022 FreePool (HiiValueArray); 1023 1023 … … 1047 1047 case EFI_IFR_TYPE_NUM_SIZE_8: 1048 1048 return (BOOLEAN) (Value1->u8 == Value2->u8); 1049 1049 1050 1050 case EFI_IFR_TYPE_NUM_SIZE_16: 1051 1051 return (BOOLEAN) (Value1->u16 == Value2->u16); 1052 1052 1053 1053 case EFI_IFR_TYPE_NUM_SIZE_32: 1054 1054 return (BOOLEAN) (Value1->u32 == Value2->u32); 1055 1055 1056 1056 case EFI_IFR_TYPE_NUM_SIZE_64: 1057 1057 return (BOOLEAN) (Value1->u64 == Value2->u64); … … 1522 1522 1523 1523 return EFI_SUCCESS; 1524 1524 1525 1525 default: 1526 1526 break;
Note:
See TracChangeset
for help on using the changeset viewer.