reduce messages

Signed-off-by: Sergey Isakov <isakov-sl@bk.ru>
This commit is contained in:
Sergey Isakov 2020-04-04 08:50:30 +03:00
parent f638ad999a
commit 314acac5ab
2 changed files with 23 additions and 11 deletions

View File

@ -207,6 +207,7 @@ EFI_STATUS XTheme::ParseSVGXIcon(void *parser, INTN Id, const XString& IconNameX
XImage NewImage(iWidth, iHeight); //empty
if (IconImage->shapes == NULL) {
*Image = NewImage;
DBG("return empty with status=%s\n", strerror(Status));
return Status;
}
@ -442,9 +443,9 @@ EFI_STATUS XTheme::ParseSVGXTheme(CONST CHAR8* buffer)
Scale = ScaleF;
CentreShift = (vbx * Scale - (float)UGAWidth) * 0.5f;
if (mainParser->font) {
DBG("theme contains font-family=%s\n", mainParser->font->fontFamily);
}
// if (mainParser->font) { //this is strange like last found font
// DBG("theme contains font-family=%s\n", mainParser->font->fontFamily);
// }
Background = XImage(UGAWidth, UGAHeight);
if (!BigBack.isEmpty()) {
@ -478,8 +479,10 @@ EFI_STATUS XTheme::ParseSVGXTheme(CONST CHAR8* buffer)
continue;
}
Icon* NewIcon = new Icon(i); //initialize with embedded but further replace by loaded
ParseSVGXIcon(mainParser, i, NewIcon->Name, Scale, &NewIcon->Image);
ParseSVGXIcon(mainParser, i, NewIcon->Name + "_night", Scale, &NewIcon->ImageNight);
/*Status = */ParseSVGXIcon(mainParser, i, NewIcon->Name, Scale, &NewIcon->Image);
// DBG("parse %s status %s\n", NewIcon->Name.c_str(), strerror(Status));
/*Status = */ParseSVGXIcon(mainParser, i, NewIcon->Name + "_night", Scale, &NewIcon->ImageNight);
// DBG("...night status %s\n", strerror(Status));
Icons.AddReference(NewIcon, true);
}
@ -527,7 +530,7 @@ EFI_STATUS XTheme::ParseSVGXTheme(CONST CHAR8* buffer)
row1TileSize = (INTN)(64.f * Scale);
MainEntriesSize = (INTN)(128.f * Scale);
}
DBG("parsing svg theme finished\n");
// DBG("parsing svg theme finished\n");
return Status;
}
@ -1055,7 +1058,6 @@ VOID testSVG()
float ty = 0; //-SVGimage->realBounds[1] * Scale;
DBG("timing rasterize start tx=%f ty=%f\n", tx, ty);
#if USE_XTHEME
nsvgRasterize(rast, SVGimage, tx,ty,Scale,Scale, (UINT8*)NewImage.GetPixelPtr(0,0), (int)Width, (int)Height, (int)Width*4);
DBG("timing rasterize end\n");
NewImage.Draw((UGAWidth - Width) / 2,
@ -1064,12 +1066,10 @@ VOID testSVG()
nsvgRasterize(rast, SVGimage, tx,ty,Scale,Scale, (UINT8*)NewImage->PixelData, (int)Width, (int)Height, (int)Width*4);
DBG("timing rasterize end\n");
//now show it!
XImage NewX(NewImage);
NewX.Draw((UGAWidth - Width) / 2,
(UGAHeight - Height) / 2);
egFreeImage(NewImage);
#endif //test XImage
FreePool(FileData);
FileData = NULL;
@ -1083,7 +1083,7 @@ VOID testSVG()
//Test text
Height = 80;
Width = UGAWidth-200;
DBG("create test textbuffer\n");
// DBG("create test textbuffer\n");
#if USE_XTHEME
XImage TextBufferXY(Width, Height);
#else

View File

@ -72,7 +72,13 @@ CONST CHAR16 *VBIOS_BIN = L"EFI\\CLOVER\\misc\\c0000.bin";
// scrolling definitions
static INTN MaxItemOnScreen = -1;
//REFIT_MENU_SCREEN OptionMenu(4, L"Options", NULL, /*InfoLineCount*/0, NULL, 0, NULL, NULL, FALSE, FALSE, 0, 0, 0, 0, {0, 0, 0, 0}, NULL );
#if USE_XTHEME
REFIT_MENU_SCREEN OptionMenu(4, L"Options"_XSW, L""_XSW);
#else
REFIT_MENU_SCREEN OptionMenu(4, L"Options", NULL);
#endif
extern REFIT_MENU_ITEM_RETURN MenuEntryReturn;
extern UINTN ThemesNum;
extern CONST CHAR16 *ThemesList[];
@ -227,10 +233,16 @@ REFIT_MENU_ITEM_SHUTDOWN MenuEntryShutdown(L"Exit Clover"_XSW, 1, 0, 'U', A
REFIT_MENU_ITEM_RETURN MenuEntryReturn (L"Return"_XSW, 0, 0, 0, ActionEnter);
#if USE_XTHEME
REFIT_MENU_SCREEN MainMenu(1, L"Main Menu"_XSW, L"Automatic boot"_XSW);
REFIT_MENU_SCREEN AboutMenu(2, L"About"_XSW, L""_XSW);
REFIT_MENU_SCREEN HelpMenu(3, L"Help"_XSW, L""_XSW);
#else
REFIT_MENU_SCREEN MainMenu(1, L"Main Menu", L"Automatic boot");
REFIT_MENU_SCREEN AboutMenu(2, L"About", NULL);
REFIT_MENU_SCREEN HelpMenu(3, L"Help", NULL);
#endif
CONST CHAR16* ArgOptional[NUM_OPT] = {
L"arch=i386", //0