| 4809 | } |
| 4810 | |
| 4811 | EFI_STATUS |
| 4812 | GetUserSettings(const TagDict* CfgDict) |
| 4813 | { |
| 4814 | EFI_STATUS Status = EFI_NOT_FOUND; |
| 4815 | |
| 4816 | if (CfgDict != NULL) { |
| 4817 | DbgHeader ("GetUserSettings"); |
| 4818 | |
| 4819 | // Boot settings. |
| 4820 | // Discussion. Why Arguments is here? It should be SystemParameters property! |
| 4821 | // we will read them again because of change in GUI menu. It is not only EarlySettings |
| 4822 | // |
| 4823 | const TagDict* BootDict = CfgDict->dictPropertyForKey("Boot"); |
| 4824 | if (BootDict != NULL) { |
| 4825 | |
| 4826 | const TagStruct* Prop = BootDict->propertyForKey("Arguments"); |
| 4827 | if ( Prop != NULL && Prop->isString() && Prop->getString()->stringValue().notEmpty() && !gSettings.BootArgs.contains(Prop->getString()->stringValue()) ) { |
| 4828 | gSettings.BootArgs = Prop->getString()->stringValue(); |
| 4829 | //gBootArgsChanged = TRUE; |
| 4830 | //gBootChanged = TRUE; |
| 4831 | } |
| 4832 | |
| 4833 | Prop = BootDict->propertyForKey("NeverDoRecovery"); |
| 4834 | gSettings.NeverDoRecovery = IsPropertyNotNullAndTrue(Prop); |
| 4835 | } |
| 4836 | |
| 4837 | |
| 4838 | //Graphics |
| 4839 | |
| 4840 | const TagDict* GraphicsDict = CfgDict->dictPropertyForKey("Graphics"); |
| 4841 | if (GraphicsDict != NULL) { |
| 4842 | INTN i; |
| 4843 | const TagStruct* Prop = GraphicsDict->propertyForKey("Inject"); |
| 4844 | if (Prop != NULL) { |
| 4845 | if (IsPropertyNotNullAndTrue(Prop)) { |
| 4846 | gSettings.GraphicsInjector = TRUE; |
| 4847 | gSettings.InjectIntel = TRUE; |
| 4848 | gSettings.InjectATI = TRUE; |
| 4849 | gSettings.InjectNVidia = TRUE; |
| 4850 | } else if (Prop->isDict()) { |
| 4851 | const TagDict* Dict2 = Prop->getDict(); |
| 4852 | const TagStruct* Prop2 = Dict2->propertyForKey("Intel"); |
| 4853 | if (Prop2 != NULL) { |
| 4854 | gSettings.InjectIntel = IsPropertyNotNullAndTrue(Prop2); |
| 4855 | } |
| 4856 | |
| 4857 | Prop2 = Dict2->propertyForKey("ATI"); |
| 4858 | if (Prop2 != NULL) { |
| 4859 | gSettings.InjectATI = IsPropertyNotNullAndTrue(Prop2); |
| 4860 | } |
| 4861 | |
| 4862 | Prop2 = Dict2->propertyForKey("NVidia"); |
| 4863 | if (Prop2 != NULL) { |
| 4864 | gSettings.InjectNVidia = IsPropertyNotNullAndTrue(Prop2); |
| 4865 | } |
| 4866 | } else { |
| 4867 | gSettings.GraphicsInjector = FALSE; |
| 4868 | gSettings.InjectIntel = FALSE; |
no test coverage detected