MCPcopy Create free account
hub / github.com/CloverHackyColor/CloverBootloader / FillingCustomTool

Function FillingCustomTool

rEFIt_UEFI/Platform/Settings.cpp:1937–2021  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1935}
1936
1937BOOLEAN
1938FillingCustomTool (IN OUT CUSTOM_TOOL_ENTRY *Entry, const TagDict* DictPointer)
1939{
1940 const TagStruct* Prop;
1941 if ((Entry == NULL) || (DictPointer == NULL)) {
1942 return FALSE;
1943 }
1944
1945 Prop = DictPointer->propertyForKey("Disabled");
1946 if (IsPropertyNotNullAndTrue(Prop)) {
1947 return FALSE;
1948 }
1949
1950 Prop = DictPointer->propertyForKey("Volume");
1951 if (Prop != NULL && (Prop->isString())) {
1952 Entry->Volume.takeValueFrom(Prop->getString()->stringValue());
1953 }
1954
1955 Prop = DictPointer->propertyForKey("Path");
1956 if (Prop != NULL && (Prop->isString())) {
1957 Entry->Path.takeValueFrom(Prop->getString()->stringValue());
1958 }
1959
1960 Prop = DictPointer->propertyForKey("Arguments");
1961 if (Prop != NULL && (Prop->isString())) {
1962// if (!Entry->Options.isEmpty()) {
1963// Entry->Options.setEmpty();
1964// } else {
1965// Entry->Options.SPrintf("%s", Prop->getString()->stringValue());
1966// }
1967 Entry->LoadOptions = Split<XString8Array>(Prop->getString()->stringValue(), " ");
1968 }
1969
1970 Prop = DictPointer->propertyForKey("FullTitle");
1971 if (Prop != NULL && (Prop->isString())) {
1972 Entry->FullTitle = Prop->getString()->stringValue();
1973 }
1974
1975 Prop = DictPointer->propertyForKey("Title");
1976 if (Prop != NULL && (Prop->isString())) {
1977 Entry->Title = Prop->getString()->stringValue();
1978 }
1979
1980 Prop = DictPointer->propertyForKey("Image");
1981 if (Prop != NULL) {
1982 Entry->ImagePath.setEmpty();
1983 if (Prop->isString()) {
1984 Entry->ImagePath = Prop->getString()->stringValue();
1985 }
1986 Entry->Image.LoadXImage(ThemeX.ThemeDir, Entry->ImagePath);
1987 } else {
1988 UINTN DataLen = 0;
1989 UINT8 *TmpData = GetDataSetting (DictPointer, "ImageData", &DataLen);
1990 if (TmpData) {
1991 if (!EFI_ERROR(Entry->Image.Image.FromPNG(TmpData, DataLen))) {
1992 Entry->Image.setFilled();
1993 }
1994 FreePool(TmpData);

Callers 1

GetEarlyUserSettingsFunction · 0.85

Calls 13

IsPropertyNotNullAndTrueFunction · 0.85
GetDataSettingFunction · 0.85
GetVolumeTypeFunction · 0.85
propertyForKeyMethod · 0.80
FromPNGMethod · 0.80
setFilledMethod · 0.80
equalICMethod · 0.80
FreePoolFunction · 0.50
isStringMethod · 0.45
getStringMethod · 0.45
setEmptyMethod · 0.45
LoadXImageMethod · 0.45

Tested by

no test coverage detected