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

View File

@ -72,7 +72,13 @@ CONST CHAR16 *VBIOS_BIN = L"EFI\\CLOVER\\misc\\c0000.bin";
// scrolling definitions // scrolling definitions
static INTN MaxItemOnScreen = -1; 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 ); //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); REFIT_MENU_SCREEN OptionMenu(4, L"Options", NULL);
#endif
extern REFIT_MENU_ITEM_RETURN MenuEntryReturn; extern REFIT_MENU_ITEM_RETURN MenuEntryReturn;
extern UINTN ThemesNum; extern UINTN ThemesNum;
extern CONST CHAR16 *ThemesList[]; 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); 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 MainMenu(1, L"Main Menu", L"Automatic boot");
REFIT_MENU_SCREEN AboutMenu(2, L"About", NULL); REFIT_MENU_SCREEN AboutMenu(2, L"About", NULL);
REFIT_MENU_SCREEN HelpMenu(3, L"Help", NULL); REFIT_MENU_SCREEN HelpMenu(3, L"Help", NULL);
#endif
CONST CHAR16* ArgOptional[NUM_OPT] = { CONST CHAR16* ArgOptional[NUM_OPT] = {
L"arch=i386", //0 L"arch=i386", //0