mirror of
https://github.com/CloverHackyColor/CloverBootloader.git
synced 2025-01-11 19:22:14 +01:00
Example of UTF16 conversion with XString.
This commit is contained in:
parent
876ed07554
commit
8b806cf4e7
@ -147,12 +147,15 @@ BOOLEAN AddLegacyEntry(IN CONST CHAR16 *FullTitle, IN CONST CHAR16 *LoaderTitle,
|
||||
if (Image) {
|
||||
Entry->Image.FromEGImage(Image);
|
||||
} else {
|
||||
UINTN Size = StrLen(Volume->LegacyOS->IconName) + 1;
|
||||
CHAR8 *IconName = (__typeof__(IconName))AllocateZeroPool(Size);
|
||||
UnicodeStrToAsciiStrS(Volume->LegacyOS->IconName, IconName, Size - 1);
|
||||
// UINTN Size = StrLen(Volume->LegacyOS->IconName) + 1;
|
||||
// CHAR8 *IconName = (__typeof__(IconName))AllocateZeroPool(Size);
|
||||
// UnicodeStrToAsciiStrS(Volume->LegacyOS->IconName, IconName, Size - 1);
|
||||
//
|
||||
// Entry->Image = ThemeX.GetIcon(IconName);
|
||||
//
|
||||
// FreePool(IconName);
|
||||
|
||||
Entry->Image = ThemeX.GetIcon(IconName);
|
||||
FreePool(IconName);
|
||||
Entry->Image = ThemeX.GetIcon(XString().takeValueFrom(Volume->LegacyOS->IconName));
|
||||
}
|
||||
#else
|
||||
if (Image) {
|
||||
|
Loading…
Reference in New Issue
Block a user