mirror of
https://github.com/CloverHackyColor/CloverBootloader.git
synced 2024-11-23 11:35:19 +01:00
Resolve conflicts. Compile, but unresolved external.
This commit is contained in:
parent
b3e48e0547
commit
fc2f226e8d
@ -68,7 +68,7 @@ int XStringW_tests()
|
||||
|
||||
XStringW CommonName(L"EFI\\CLOVER\\misc\\screenshot");
|
||||
for (UINTN Index = 0; Index < 20; Index++) {
|
||||
XStringW Name = CommonName + SPrintf("%d", Index) + L".png";
|
||||
XStringW Name = CommonName + SPrintf("%lld", Index) + L".png";
|
||||
DebugLog(2, "XStringW_test shot: %s\n", Name.data());
|
||||
}
|
||||
return 0;
|
||||
|
@ -68,17 +68,6 @@
|
||||
//#define TAG_EXIT_OLD (101)
|
||||
//#define TAG_RETURN_OLD ((UINTN)(-1))
|
||||
|
||||
|
||||
//typedef VOID(*MENU_STYLE_FUNC)(IN UINTN Function, IN CONST CHAR16 *ParamText);
|
||||
enum MENU_STYLE_VALUE {
|
||||
Text,
|
||||
Options,
|
||||
Refit,
|
||||
Vertical,
|
||||
BootCamp
|
||||
};
|
||||
|
||||
|
||||
//typedef struct _refit_menu_screen REFIT_MENU_SCREEN;
|
||||
class REFIT_MENU_SCREEN;
|
||||
class REFIT_MENU_SWITCH;
|
||||
@ -409,7 +398,7 @@ public:
|
||||
UINTN mItemID;
|
||||
XPointer *mPointer;
|
||||
SCROLL_STATE ScrollState;
|
||||
MENU_STYLE_VALUE StyleValue;
|
||||
MENU_STYLE_FUNC StyleFunc;
|
||||
|
||||
|
||||
REFIT_MENU_SCREEN()
|
||||
@ -417,7 +406,7 @@ public:
|
||||
TimeoutSeconds(0), TimeoutText(0), Theme(0), AnimeRun(0),
|
||||
Once(0), LastDraw(0), CurrentFrame(0),
|
||||
Frames(0), FrameTime(0), FilmPlace({0,0,0,0}),
|
||||
Film(0), StyleValue(Text)
|
||||
Film(0)
|
||||
{};
|
||||
|
||||
REFIT_MENU_SCREEN( UINTN ID_,
|
||||
@ -441,7 +430,7 @@ public:
|
||||
TimeoutText(TimeoutText_), Theme(Theme_), AnimeRun(AnimeRun_),
|
||||
Once(Once_), LastDraw(LastDraw_), CurrentFrame(CurrentFrame_),
|
||||
Frames(Frames_), FrameTime(FrameTime_), FilmPlace(FilmPlace_),
|
||||
Film(Film_), StyleValue(Text)
|
||||
Film(Film_)
|
||||
{};
|
||||
|
||||
REFIT_MENU_SCREEN( UINTN ID_,
|
||||
@ -466,7 +455,7 @@ public:
|
||||
TimeoutText(TimeoutText_), Theme(Theme_), AnimeRun(AnimeRun_),
|
||||
Once(Once_), LastDraw(LastDraw_), CurrentFrame(CurrentFrame_),
|
||||
Frames(Frames_), FrameTime(FrameTime_), FilmPlace(FilmPlace_),
|
||||
Film(Film_), StyleValue(Text)
|
||||
Film(Film_)
|
||||
{
|
||||
Entries.AddReference(entry, false);
|
||||
};
|
||||
@ -494,7 +483,7 @@ public:
|
||||
TimeoutText(TimeoutText_), Theme(Theme_), AnimeRun(AnimeRun_),
|
||||
Once(Once_), LastDraw(LastDraw_), CurrentFrame(CurrentFrame_),
|
||||
Frames(Frames_), FrameTime(FrameTime_), FilmPlace(FilmPlace_),
|
||||
Film(Film_), StyleValue(Text)
|
||||
Film(Film_)
|
||||
{
|
||||
Entries.AddReference(entry1, false);
|
||||
Entries.AddReference(entry2, false);
|
||||
@ -511,8 +500,8 @@ public:
|
||||
VOID AddMenuEntry(IN REFIT_MENU_ENTRY *Entry, bool freeIt);
|
||||
VOID FreeMenu();
|
||||
INTN FindMenuShortcutEntry(IN CHAR16 Shortcut);
|
||||
UINTN InputDialog();
|
||||
UINTN RunGenericMenu(IN MENU_STYLE_VALUE StyleFunc, IN OUT INTN *DefaultEntryIndex, OUT REFIT_ABSTRACT_MENU_ENTRY **ChosenEntry);
|
||||
UINTN InputDialog(IN MENU_STYLE_FUNC StyleFunc);
|
||||
UINTN RunGenericMenu(IN MENU_STYLE_FUNC StyleFunc, IN OUT INTN *DefaultEntryIndex, OUT REFIT_ABSTRACT_MENU_ENTRY **ChosenEntry);
|
||||
UINTN RunMenu(OUT REFIT_ABSTRACT_MENU_ENTRY **ChosenEntry);
|
||||
UINTN RunMainMenu(IN INTN DefaultSelection, OUT REFIT_ABSTRACT_MENU_ENTRY **ChosenEntry);
|
||||
|
||||
@ -522,8 +511,9 @@ public:
|
||||
BOOLEAN GetAnime();
|
||||
VOID UpdateAnime(const EG_RECT *Place);
|
||||
|
||||
UINTN InputDialog();
|
||||
|
||||
//Style functions
|
||||
VOID StyleFunc(IN UINTN Function, IN CONST CHAR16 *ParamText);
|
||||
virtual VOID MainMenuStyle(IN UINTN Function, IN CONST CHAR16 *ParamText);
|
||||
virtual VOID MainMenuVerticalStyle(IN UINTN Function, IN CONST CHAR16 *ParamText);
|
||||
virtual VOID GraphicsMenuStyle(IN UINTN Function, IN CONST CHAR16 *ParamText);
|
||||
|
@ -645,7 +645,7 @@ EFI_STATUS egScreenShot(VOID)
|
||||
XStringW CommonName(L"EFI\\CLOVER\\misc\\screenshot");
|
||||
for (UINTN Index = 0; Index < 60; Index++) {
|
||||
// ScreenshotName = PoolPrint(L"%a%d.png", ScreenShotName, Index);
|
||||
XStringW Name = CommonName + SPrintf("%d", Index) + L".png";
|
||||
XStringW Name = CommonName + SPrintf("%lld", Index) + L".png";
|
||||
if (!FileExists(SelfRootDir, Name.data())) {
|
||||
Status = egSaveFile(SelfRootDir, Name.data(), FileData, FileDataLength);
|
||||
if (!EFI_ERROR(Status)) {
|
||||
|
@ -207,9 +207,9 @@ EG_IMAGE * egDecodeICNS(IN UINT8 *FileData, IN UINTN FileDataLength, IN UINTN Ic
|
||||
// pixel data is compressed, RGB planar
|
||||
CompData = DataPtr;
|
||||
CompLen = DataLen;
|
||||
egDecompressIcnsRLE(&CompData, &CompLen, PLPTR(NewImage, r), PixelCount);
|
||||
egDecompressIcnsRLE(&CompData, &CompLen, PLPTR(NewImage, g), PixelCount);
|
||||
egDecompressIcnsRLE(&CompData, &CompLen, PLPTR(NewImage, b), PixelCount);
|
||||
egDecompressIcnsRLE(&CompData, &CompLen, &NewImage->PixelData->r, PixelCount);
|
||||
egDecompressIcnsRLE(&CompData, &CompLen, &NewImage->PixelData->g, PixelCount);
|
||||
egDecompressIcnsRLE(&CompData, &CompLen, &NewImage->PixelData->b, PixelCount);
|
||||
// possible assertion: CompLen == 0
|
||||
if (CompLen > 0) {
|
||||
DBG(" egLoadICNSIcon: %d bytes of compressed data left\n", CompLen);
|
||||
@ -227,12 +227,16 @@ EG_IMAGE * egDecodeICNS(IN UINT8 *FileData, IN UINTN FileDataLength, IN UINTN Ic
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// Jief : not sure where they should define TODO !
|
||||
extern VOID egInsertPlane(IN UINT8 *SrcDataPtr, IN UINT8 *DestPlanePtr, IN UINTN PixelCount);
|
||||
extern VOID egSetPlane(IN UINT8 *DestPlanePtr, IN UINT8 Value, IN UINT64 PixelCount);
|
||||
|
||||
// add/set alpha plane
|
||||
if (MaskPtr != NULL && MaskLen >= PixelCount && WantAlpha)
|
||||
egInsertPlane(MaskPtr, PLPTR(NewImage, a), PixelCount);
|
||||
egInsertPlane(MaskPtr, &NewImage->PixelData->a, PixelCount);
|
||||
else
|
||||
egSetPlane(PLPTR(NewImage, a), WantAlpha ? 255 : 0, PixelCount);
|
||||
egSetPlane(&NewImage->PixelData->a, WantAlpha ? 255 : 0, PixelCount);
|
||||
|
||||
// FUTURE: scale to originally requested size if we had to load another size
|
||||
|
||||
|
@ -2450,7 +2450,7 @@ UINTN REFIT_MENU_SCREEN::InputDialog()
|
||||
}
|
||||
|
||||
|
||||
UINTN REFIT_MENU_SCREEN::RunGenericMenu(IN MENU_STYLE_VALUE StyleValue, IN OUT INTN *DefaultEntryIndex, OUT REFIT_ABSTRACT_MENU_ENTRY **ChosenEntry)
|
||||
UINTN REFIT_MENU_SCREEN::RunGenericMenu(IN MENU_STYLE_FUNC StyleFunc, IN OUT INTN *DefaultEntryIndex, OUT REFIT_ABSTRACT_MENU_ENTRY **ChosenEntry)
|
||||
{
|
||||
EFI_STATUS Status;
|
||||
EFI_INPUT_KEY key;
|
||||
@ -2562,9 +2562,9 @@ UINTN REFIT_MENU_SCREEN::RunGenericMenu(IN MENU_STYLE_VALUE StyleValue, IN OUT I
|
||||
ScrollState.LastSelection = ScrollState.CurrentSelection;
|
||||
ScrollState.CurrentSelection = mItemID;
|
||||
if ( Entries[mItemID].getREFIT_INPUT_DIALOG() || Entries[mItemID].getREFIT_MENU_CHECKBIT() ) {
|
||||
MenuExit = InputDialog();
|
||||
MenuExit = InputDialog(StyleFunc);
|
||||
} else if (Entries[mItemID].getREFIT_MENU_SWITCH()) {
|
||||
MenuExit = InputDialog();
|
||||
MenuExit = InputDialog(StyleFunc);
|
||||
ScrollState.PaintAll = TRUE;
|
||||
HidePointer();
|
||||
} else if (!Entries[mItemID].getREFIT_INFO_DIALOG()) {
|
||||
@ -2585,7 +2585,7 @@ UINTN REFIT_MENU_SCREEN::RunGenericMenu(IN MENU_STYLE_VALUE StyleValue, IN OUT I
|
||||
ScrollState.CurrentSelection = mItemID;
|
||||
if ((Entries[mItemID].getREFIT_INPUT_DIALOG()) ||
|
||||
(Entries[mItemID].getREFIT_MENU_CHECKBIT())) {
|
||||
MenuExit = InputDialog();
|
||||
MenuExit = InputDialog(StyleFunc);
|
||||
} else if (Entries[mItemID].getREFIT_MENU_SWITCH()) {
|
||||
MenuExit = InputDialog(StyleFunc);
|
||||
ScrollState.PaintAll = TRUE;
|
||||
@ -2738,9 +2738,9 @@ UINTN REFIT_MENU_SCREEN::RunGenericMenu(IN MENU_STYLE_VALUE StyleValue, IN OUT I
|
||||
case CHAR_CARRIAGE_RETURN:
|
||||
if ((Entries[ScrollState.CurrentSelection].getREFIT_INPUT_DIALOG()) ||
|
||||
(Entries[ScrollState.CurrentSelection].getREFIT_MENU_CHECKBIT())) {
|
||||
MenuExit = InputDialog();
|
||||
MenuExit = InputDialog(StyleFunc);
|
||||
} else if (Entries[ScrollState.CurrentSelection].getREFIT_MENU_SWITCH()){
|
||||
MenuExit = InputDialog();
|
||||
MenuExit = InputDialog(StyleFunc);
|
||||
ScrollState.PaintAll = TRUE;
|
||||
} else if (Entries[ScrollState.CurrentSelection].getREFIT_MENU_ENTRY_CLOVER()){
|
||||
MenuExit = MENU_EXIT_DETAILS;
|
||||
@ -2751,9 +2751,9 @@ UINTN REFIT_MENU_SCREEN::RunGenericMenu(IN MENU_STYLE_VALUE StyleValue, IN OUT I
|
||||
case ' ': //CHAR_SPACE
|
||||
if ((Entries[ScrollState.CurrentSelection].getREFIT_INPUT_DIALOG()) ||
|
||||
(Entries[ScrollState.CurrentSelection].getREFIT_MENU_CHECKBIT())) {
|
||||
MenuExit = InputDialog();
|
||||
MenuExit = InputDialog(StyleFunc);
|
||||
} else if (Entries[ScrollState.CurrentSelection].getREFIT_MENU_SWITCH()){
|
||||
MenuExit = InputDialog();
|
||||
MenuExit = InputDialog(StyleFunc);
|
||||
ScrollState.PaintAll = TRUE;
|
||||
HidePointer();
|
||||
} else if (!Entries[ScrollState.CurrentSelection].getREFIT_INFO_DIALOG()) {
|
||||
@ -3424,7 +3424,7 @@ VOID REFIT_MENU_SCREEN::GraphicsMenuStyle(IN UINTN Function, IN CONST CHAR16 *Pa
|
||||
|
||||
case MENU_FUNCTION_INIT:
|
||||
egGetScreenSize(&UGAWidth, &UGAHeight);
|
||||
InitAnime(this); // Should InitAnime be a method of REFIT_MENU_SCREEN ? If yes, parameter will not be needed anymore.
|
||||
InitAnime();
|
||||
SwitchToGraphicsAndClear();
|
||||
|
||||
EntriesPosY = ((UGAHeight - (int)(LAYOUT_TOTAL_HEIGHT * GlobalConfig.Scale)) >> 1) + (int)(LayoutBannerOffset * GlobalConfig.Scale) + (TextHeight << 1);
|
||||
@ -3970,7 +3970,7 @@ VOID REFIT_MENU_SCREEN::MainMenuVerticalStyle(IN UINTN Function, IN CONST CHAR16
|
||||
|
||||
case MENU_FUNCTION_INIT:
|
||||
egGetScreenSize(&UGAWidth, &UGAHeight);
|
||||
InitAnime(this); // Should InitAnime be a method of REFIT_MENU_SCREEN ? If yes, parameter will not be needed anymore.
|
||||
InitAnime();
|
||||
SwitchToGraphicsAndClear();
|
||||
//BltClearScreen(FALSE);
|
||||
//adjustable by theme.plist?
|
||||
@ -4119,7 +4119,7 @@ VOID REFIT_MENU_SCREEN::MainMenuStyle(IN UINTN Function, IN CONST CHAR16 *ParamT
|
||||
|
||||
case MENU_FUNCTION_INIT:
|
||||
egGetScreenSize(&UGAWidth, &UGAHeight);
|
||||
InitAnime(this); // Should InitAnime be a method of REFIT_MENU_SCREEN ? If yes, parameter will not be needed anymore.
|
||||
InitAnime();
|
||||
SwitchToGraphicsAndClear();
|
||||
//BltClearScreen(FALSE);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user