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

Function FillingCustomLegacy

rEFIt_UEFI/Platform/Settings.cpp:1839–1935  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1837}
1838
1839BOOLEAN
1840FillingCustomLegacy (
1841 IN OUT CUSTOM_LEGACY_ENTRY *Entry,
1842 const TagDict* DictPointer
1843 )
1844{
1845 const TagStruct* Prop;
1846 if ((Entry == NULL) || (DictPointer == NULL)) {
1847 return FALSE;
1848 }
1849
1850 Prop = DictPointer->propertyForKey("Disabled");
1851 if (IsPropertyNotNullAndTrue(Prop)) {
1852 return FALSE;
1853 }
1854
1855 Prop = DictPointer->propertyForKey("Volume");
1856 if (Prop != NULL && (Prop->isString())) {
1857 Entry->Volume = Prop->getString()->stringValue();
1858 }
1859
1860 Prop = DictPointer->propertyForKey("FullTitle");
1861 if (Prop != NULL && (Prop->isString())) {
1862 Entry->FullTitle = Prop->getString()->stringValue();
1863 }
1864
1865 Prop = DictPointer->propertyForKey("Title");
1866 if (Prop != NULL && (Prop->isString())) {
1867 Entry->Title = Prop->getString()->stringValue();
1868 }
1869 Prop = DictPointer->propertyForKey("Image");
1870 if (Prop != NULL) {
1871 if (Prop->isString()) {
1872 Entry->Image.LoadXImage(ThemeX.ThemeDir, Prop->getString()->stringValue());
1873 }
1874 } else {
1875 UINTN DataLen = 0;
1876 UINT8 *TmpData = GetDataSetting (DictPointer, "ImageData", &DataLen);
1877 if (TmpData) {
1878 if (!EFI_ERROR(Entry->Image.Image.FromPNG(TmpData, DataLen))) {
1879 Entry->Image.setFilled();
1880 }
1881 FreePool(TmpData);
1882 }
1883 }
1884
1885 Prop = DictPointer->propertyForKey("DriveImage");
1886 if (Prop != NULL) {
1887 if (Prop->isString()) {
1888 Entry->Image.LoadXImage(ThemeX.ThemeDir, Prop->getString()->stringValue());
1889 }
1890 } else {
1891 UINTN DataLen = 0;
1892 UINT8 *TmpData = GetDataSetting (DictPointer, "DriveImageData", &DataLen);
1893 if (TmpData) {
1894 if (!EFI_ERROR(Entry->DriveImage.Image.FromPNG(TmpData, DataLen))) {
1895 Entry->DriveImage.setFilled();
1896 }

Callers 1

GetEarlyUserSettingsFunction · 0.85

Calls 12

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
LoadXImageMethod · 0.45
notEmptyMethod · 0.45

Tested by

no test coverage detected