]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Library/CustomizedDisplayLib/CustomizedDisplayLibInternal.c
EDKII:Display engine should not depend on the framework code
[mirror_edk2.git] / MdeModulePkg / Library / CustomizedDisplayLib / CustomizedDisplayLibInternal.c
index ad4bc9ac90898a07def7570180f29397e274b8c2..f9032b86de5e04fc2228b77c204def33e6074228 100644 (file)
@@ -2,7 +2,7 @@
 \r
   This library class defines a set of interfaces to customize Display module\r
 \r
-Copyright (c) 2013, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2013-2015, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials are licensed and made available under \r
 the terms and conditions of the BSD License that accompanies this distribution.  \r
 The full text of the license may be found at\r
@@ -256,7 +256,32 @@ ProcessUserOpcode(
   IN  EFI_IFR_OP_HEADER         *OpCodeData\r
   )\r
 {\r
+  EFI_GUID *   ClassGuid;\r
+  UINT8        ClassGuidNum;\r
+\r
+  ClassGuid    = NULL;\r
+  ClassGuidNum = 0;\r
+\r
   switch (OpCodeData->OpCode) {\r
+    case EFI_IFR_FORM_SET_OP:\r
+      //\r
+      // process the statement outside of form,if it is formset op, get its formsetguid or classguid and compared with gFrontPageFormSetGuid\r
+      //\r
+      if (CompareGuid((EFI_GUID*)PcdGetPtr (PcdFrontPageFormSetGuid),(EFI_GUID*)&((EFI_IFR_FORM_SET *) OpCodeData)->Guid)){\r
+        gClassOfVfr = FORMSET_CLASS_FRONT_PAGE;\r
+      } else{\r
+        ClassGuidNum = (UINT8)(((EFI_IFR_FORM_SET *)OpCodeData)->Flags & 0x3);\r
+        ClassGuid    = (EFI_GUID *)(VOID *)((UINT8 *)OpCodeData + sizeof (EFI_IFR_FORM_SET));\r
+        while (ClassGuidNum-- > 0){\r
+          if (CompareGuid((EFI_GUID*)PcdGetPtr (PcdFrontPageFormSetGuid),ClassGuid)){\r
+            gClassOfVfr = FORMSET_CLASS_FRONT_PAGE;\r
+            break;\r
+          }\r
+          ClassGuid ++;\r
+        }\r
+      }\r
+      break;\r
+\r
     case EFI_IFR_GUID_OP:     \r
       if (CompareGuid (&gEfiIfrTianoGuid, (EFI_GUID *)((CHAR8*) OpCodeData + sizeof (EFI_IFR_OP_HEADER)))) {\r
         //\r