fix DefaultBackgroundColor

Signed-off-by: SergeySlice <sergey.slice@gmail.com>
This commit is contained in:
SergeySlice 2022-07-02 10:08:53 +03:00
parent de81f99435
commit 53f60e49d7
6 changed files with 45 additions and 97 deletions

View File

@ -69,6 +69,7 @@ constexpr const EFI_GUID gDataHubPlatformGuid = {
}; };
extern APPLE_SMC_IO_PROTOCOL *gAppleSmc; extern APPLE_SMC_IO_PROTOCOL *gAppleSmc;
extern UINT32 mCurrentColor;
typedef union { typedef union {
@ -359,6 +360,7 @@ SetVariablesForOSX(LOADER_ENTRY *Entry)
UINT16 DensityThreshold = 0x96; UINT16 DensityThreshold = 0x96;
UINT64 ConfigStatus = 0; UINT64 ConfigStatus = 0;
Color = gSettings.BootGraphics.DefaultBackgroundColor; Color = gSettings.BootGraphics.DefaultBackgroundColor;
mCurrentColor = Color;
DBG("set DefaultBackgroundColor=0x%x\n", Color); DBG("set DefaultBackgroundColor=0x%x\n", Color);
SetNvramVariable(L"DefaultBackgroundColor", gEfiAppleNvramGuid, Attributes, 4, &Color); SetNvramVariable(L"DefaultBackgroundColor", gEfiAppleNvramGuid, Attributes, 4, &Color);
// add some UI variables // add some UI variables

View File

@ -47,6 +47,9 @@ CHAR8* BootOSName = NULL;
UINT16 KeyboardVendor = 0x05ac; //Apple inc. UINT16 KeyboardVendor = 0x05ac; //Apple inc.
UINT16 KeyboardProduct = 0x021d; //iMac aluminium UINT16 KeyboardProduct = 0x021d; //iMac aluminium
extern UINT32 mCurrentColor;
extern EFI_GUID gAppleUserInterfaceThemeProtocolGuid;
typedef struct _APPLE_GETVAR_PROTOCOL APPLE_GETVAR_PROTOCOL; typedef struct _APPLE_GETVAR_PROTOCOL APPLE_GETVAR_PROTOCOL;
// GET_PROPERTY_VALUE // GET_PROPERTY_VALUE
@ -331,26 +334,39 @@ EFI_KEYBOARD_INFO_PROTOCOL mKeyboardInfo = {
UsbKbGetKeyboardDeviceInfo UsbKbGetKeyboardDeviceInfo
}; };
//#define OCQUIRKS_PROTOCOL_REVISION 23 extern EFI_GUID gAppleUserInterfaceThemeProtocolGuid;
//
//EFI_STATUS typedef EFI_STATUS (EFIAPI *APPLE_USER_INTERFACE_THEME_GETCOLOR) (
//EFIAPI IN OUT UINT32 * Color
//GetQuirksConfig (IN OCQUIRKS_PROTOCOL *This, );
// OUT OC_ABC_SETTINGS_4CLOVER *Buffer,
// OUT XBool *GopEnable
// ) typedef struct {
//{ UINT64 Version;
// DBG("GetQuirksConfig called\n"); APPLE_USER_INTERFACE_THEME_GETCOLOR GetColor;
// CopyMem(Buffer, &gQuirks, sizeof(OC_ABC_SETTINGS_4CLOVER)); } APPLE_USER_INTERFACE_THEME_PROTOCOL;
// *GopEnable = gProvideConsoleGopEnable;
// return EFI_SUCCESS; EFI_STATUS
//} EFIAPI
// UserInterfaceThemeGetColor (
//OCQUIRKS_PROTOCOL mQuirksConfig = { UINT32 *Color
// OCQUIRKS_PROTOCOL_REVISION, )
// 0, //reserved {
// GetQuirksConfig if (Color == NULL) {
//}; return EFI_INVALID_PARAMETER;
}
*Color = mCurrentColor;
return EFI_SUCCESS;
}
STATIC APPLE_USER_INTERFACE_THEME_PROTOCOL mAppleUserInterfaceThemeProtocol = {
1,
UserInterfaceThemeGetColor
};
EFI_STATUS EFI_STATUS
SetPrivateVarProto(void) SetPrivateVarProto(void)
@ -367,8 +383,8 @@ SetPrivateVarProto(void)
&mGraphConfig, &mGraphConfig,
&gEfiKeyboardInfoProtocolGuid, &gEfiKeyboardInfoProtocolGuid,
&mKeyboardInfo, &mKeyboardInfo,
// &gOcQuirksProtocolGuid, &gAppleUserInterfaceThemeProtocolGuid,
// &mQuirksConfig, &mAppleUserInterfaceThemeProtocol,
NULL NULL
); );
//obligatory protocol //obligatory protocol

View File

@ -26,7 +26,7 @@
#define QUIRK_VIRT bit(13) #define QUIRK_VIRT bit(13)
#define QUIRK_OS bit(14) #define QUIRK_OS bit(14)
#define QUIRK_PERM bit(15) #define QUIRK_PERM bit(15)
#define QUIRK_GPUBAR bit(16) //#define QUIRK_GPUBAR bit(16) //this quirk is not boolean

View File

@ -527,6 +527,7 @@
gAppleEventProtocolGuid gAppleEventProtocolGuid
gEfiOSInfoProtocolGuid gEfiOSInfoProtocolGuid
gEfiKeyboardInfoProtocolGuid gEfiKeyboardInfoProtocolGuid
gAppleUserInterfaceThemeProtocolGuid
gFSInjectProtocolGuid gFSInjectProtocolGuid
gMsgLogProtocolGuid gMsgLogProtocolGuid

View File

@ -121,7 +121,7 @@
XBool gGuiIsReady = false; XBool gGuiIsReady = false;
XBool gThemeNeedInit = true; XBool gThemeNeedInit = true;
XBool DoHibernateWake = false; XBool DoHibernateWake = false;
UINT32 mCurrentColor;
//EFI_HANDLE ConsoleInHandle; //EFI_HANDLE ConsoleInHandle;
//EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL* SimpleTextEx; //EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL* SimpleTextEx;
@ -1007,10 +1007,11 @@ void LOADER_ENTRY::StartLoader()
mOpenCoreConfiguration.Booter.Quirks.ProvideCustomSlide = gSettings.Quirks.OcBooterQuirks.ProvideCustomSlide; mOpenCoreConfiguration.Booter.Quirks.ProvideCustomSlide = gSettings.Quirks.OcBooterQuirks.ProvideCustomSlide;
mOpenCoreConfiguration.Booter.Quirks.ProvideMaxSlide = gSettings.Quirks.OcBooterQuirks.ProvideMaxSlide; mOpenCoreConfiguration.Booter.Quirks.ProvideMaxSlide = gSettings.Quirks.OcBooterQuirks.ProvideMaxSlide;
mOpenCoreConfiguration.Booter.Quirks.RebuildAppleMemoryMap = gSettings.Quirks.OcBooterQuirks.RebuildAppleMemoryMap; mOpenCoreConfiguration.Booter.Quirks.RebuildAppleMemoryMap = gSettings.Quirks.OcBooterQuirks.RebuildAppleMemoryMap;
mOpenCoreConfiguration.Booter.Quirks.ResizeAppleGpuBars = gSettings.Quirks.OcBooterQuirks.ResizeAppleGpuBars;
mOpenCoreConfiguration.Booter.Quirks.SetupVirtualMap = gSettings.Quirks.OcBooterQuirks.SetupVirtualMap; mOpenCoreConfiguration.Booter.Quirks.SetupVirtualMap = gSettings.Quirks.OcBooterQuirks.SetupVirtualMap;
mOpenCoreConfiguration.Booter.Quirks.SignalAppleOS = gSettings.Quirks.OcBooterQuirks.SignalAppleOS; mOpenCoreConfiguration.Booter.Quirks.SignalAppleOS = gSettings.Quirks.OcBooterQuirks.SignalAppleOS;
mOpenCoreConfiguration.Booter.Quirks.SyncRuntimePermissions = gSettings.Quirks.OcBooterQuirks.SyncRuntimePermissions; mOpenCoreConfiguration.Booter.Quirks.SyncRuntimePermissions = gSettings.Quirks.OcBooterQuirks.SyncRuntimePermissions;
mOpenCoreConfiguration.Booter.Quirks.ResizeAppleGpuBars = gSettings.Quirks.OcBooterQuirks.ResizeAppleGpuBars;
#endif #endif

View File

@ -1166,11 +1166,6 @@ void AboutRefit(void)
AboutMenu.GetAnime(); AboutMenu.GetAnime();
AboutMenu.AddMenuEntry(&MenuEntryReturn, false); AboutMenu.AddMenuEntry(&MenuEntryReturn, false);
} else if (AboutMenu.Entries.size() >= 2) { } else if (AboutMenu.Entries.size() >= 2) {
/*
EntryCount instead of InfoLineCount. Lastline == return/back. Is necessary recheck screen res here?
*/
// FreePool(AboutMenu.Entries[AboutMenu.Entries.size()-2].Title); //what is FreePool(XStringW)?
AboutMenu.Entries[AboutMenu.Entries.size()-2].Title.SWPrintf(" Screen Output: %s", egScreenDescription().c_str()); AboutMenu.Entries[AboutMenu.Entries.size()-2].Title.SWPrintf(" Screen Output: %s", egScreenDescription().c_str());
} }
@ -1184,9 +1179,6 @@ void HelpRefit(void)
if (!(ThemeX.HideUIFlags & HIDEUI_FLAG_MENU_TITLE_IMAGE)) { if (!(ThemeX.HideUIFlags & HIDEUI_FLAG_MENU_TITLE_IMAGE)) {
HelpMenu.TitleImage = ThemeX.GetIcon(BUILTIN_ICON_FUNC_HELP); HelpMenu.TitleImage = ThemeX.GetIcon(BUILTIN_ICON_FUNC_HELP);
} }
//else {
// HelpMenu.TitleImage.setEmpty();
//}
switch (gSettings.GUI.languageCode) switch (gSettings.GUI.languageCode)
{ {
case russian: case russian:
@ -2010,7 +2002,6 @@ REFIT_ABSTRACT_MENU_ENTRY* SubMenuDropTables()
// DropTable->Length, DropTable->Length); // DropTable->Length, DropTable->Length);
InputBootArgs = new REFIT_INPUT_DIALOG; InputBootArgs = new REFIT_INPUT_DIALOG;
InputBootArgs->Title.SWPrintf("Drop \"%4.4s\" \"%8.8s\" %d", sign, OTID, DropTable->Length); InputBootArgs->Title.SWPrintf("Drop \"%4.4s\" \"%8.8s\" %d", sign, OTID, DropTable->Length);
// InputBootArgs->Tag = TAG_INPUT;
InputBootArgs->Row = 0xFFFF; //cursor InputBootArgs->Row = 0xFFFF; //cursor
InputBootArgs->Item = &(DropTable->MenuItem); InputBootArgs->Item = &(DropTable->MenuItem);
InputBootArgs->AtClick = ActionEnter; InputBootArgs->AtClick = ActionEnter;
@ -2028,7 +2019,6 @@ REFIT_ABSTRACT_MENU_ENTRY* SubMenuDropTables()
ACPI_PATCHED_AML& ACPIPatchedAMLTmp = ACPIPatchedAML[idx]; ACPI_PATCHED_AML& ACPIPatchedAMLTmp = ACPIPatchedAML[idx];
InputBootArgs = new REFIT_INPUT_DIALOG; InputBootArgs = new REFIT_INPUT_DIALOG;
InputBootArgs->Title.SWPrintf("Drop \"%s\"", ACPIPatchedAMLTmp.FileName.c_str()); InputBootArgs->Title.SWPrintf("Drop \"%s\"", ACPIPatchedAMLTmp.FileName.c_str());
// InputBootArgs->Tag = TAG_INPUT;
InputBootArgs->Row = 0xFFFF; //cursor InputBootArgs->Row = 0xFFFF; //cursor
InputBootArgs->Item = &(ACPIPatchedAMLTmp.MenuItem); InputBootArgs->Item = &(ACPIPatchedAMLTmp.MenuItem);
InputBootArgs->AtClick = ActionEnter; InputBootArgs->AtClick = ActionEnter;
@ -2076,10 +2066,8 @@ REFIT_ABSTRACT_MENU_ENTRY* SubMenuDsdtFix()
{ {
REFIT_MENU_ITEM_OPTIONS *Entry; //, *SubEntry; REFIT_MENU_ITEM_OPTIONS *Entry; //, *SubEntry;
REFIT_MENU_SCREEN *SubScreen; REFIT_MENU_SCREEN *SubScreen;
// REFIT_INPUT_DIALOG *InputBootArgs;
Entry = newREFIT_MENU_ITEM_OPTIONS(&SubScreen, ActionEnter, SCREEN_DSDT, NullXString8); Entry = newREFIT_MENU_ITEM_OPTIONS(&SubScreen, ActionEnter, SCREEN_DSDT, NullXString8);
// Entry->Title.SPrintf("DSDT fix mask [0x%08hhx]->", gSettings.ACPI.DSDT.FixDsdt);
SubScreen->AddMenuCheck("Add DTGP", FIX_DTGP, 67); SubScreen->AddMenuCheck("Add DTGP", FIX_DTGP, 67);
SubScreen->AddMenuCheck("Fix Darwin as WinXP", FIX_WARNING, 67); SubScreen->AddMenuCheck("Fix Darwin as WinXP", FIX_WARNING, 67);
@ -2098,7 +2086,6 @@ REFIT_ABSTRACT_MENU_ENTRY* SubMenuDsdtFix()
SubScreen->AddMenuCheck("Fix LAN", FIX_LAN, 67); SubScreen->AddMenuCheck("Fix LAN", FIX_LAN, 67);
SubScreen->AddMenuCheck("Fix Airport", FIX_WIFI, 67); SubScreen->AddMenuCheck("Fix Airport", FIX_WIFI, 67);
SubScreen->AddMenuCheck("Fix sound", FIX_HDA, 67); SubScreen->AddMenuCheck("Fix sound", FIX_HDA, 67);
// SubScreen->AddMenuCheck("Fix new way", FIX_NEW_WAY, 67);
SubScreen->AddMenuCheck("Fix RTC", FIX_RTC, 67); SubScreen->AddMenuCheck("Fix RTC", FIX_RTC, 67);
SubScreen->AddMenuCheck("Fix TMR", FIX_TMR, 67); SubScreen->AddMenuCheck("Fix TMR", FIX_TMR, 67);
SubScreen->AddMenuCheck("Add IMEI", FIX_IMEI, 67); SubScreen->AddMenuCheck("Add IMEI", FIX_IMEI, 67);
@ -2111,7 +2098,6 @@ REFIT_ABSTRACT_MENU_ENTRY* SubMenuDsdtFix()
SubScreen->AddMenuCheck("Rename ACST", FIX_ACST, 67); SubScreen->AddMenuCheck("Rename ACST", FIX_ACST, 67);
SubScreen->AddMenuCheck("Add HDMI", FIX_HDMI, 67); SubScreen->AddMenuCheck("Add HDMI", FIX_HDMI, 67);
SubScreen->AddMenuCheck("Fix Regions", FIX_REGIONS, 67); SubScreen->AddMenuCheck("Fix Regions", FIX_REGIONS, 67);
// SubScreen->AddMenuCheck("Fix Headers", FIX_HEADERS_DEPRECATED, 67);
SubScreen->AddMenuCheck("Fix Mutex", FIX_MUTEX, 67); SubScreen->AddMenuCheck("Fix Mutex", FIX_MUTEX, 67);
SubScreen->AddMenuEntry(&MenuEntryReturn, false); SubScreen->AddMenuEntry(&MenuEntryReturn, false);
@ -2127,14 +2113,12 @@ REFIT_ABSTRACT_MENU_ENTRY* SubMenuDSDTPatches()
REFIT_INPUT_DIALOG *InputBootArgs; REFIT_INPUT_DIALOG *InputBootArgs;
size_t PatchDsdtNum = gSettings.ACPI.DSDT.DSDTPatchArray.size(); size_t PatchDsdtNum = gSettings.ACPI.DSDT.DSDTPatchArray.size();
// INPUT_ITEM* DSDTPatchesMenu = gSettings.PatchDsdtMenuItem;
Entry = newREFIT_MENU_ITEM_OPTIONS(&SubScreen, ActionEnter, SCREEN_DSDT_PATCHES, "Custom DSDT patches->"_XS8); Entry = newREFIT_MENU_ITEM_OPTIONS(&SubScreen, ActionEnter, SCREEN_DSDT_PATCHES, "Custom DSDT patches->"_XS8);
for (size_t Index = 0; Index < PatchDsdtNum; Index++) { for (size_t Index = 0; Index < PatchDsdtNum; Index++) {
InputBootArgs = new REFIT_INPUT_DIALOG; InputBootArgs = new REFIT_INPUT_DIALOG;
InputBootArgs->Title.SWPrintf("%90s", gSettings.ACPI.DSDT.DSDTPatchArray[Index].PatchDsdtLabel.c_str()); InputBootArgs->Title.SWPrintf("%90s", gSettings.ACPI.DSDT.DSDTPatchArray[Index].PatchDsdtLabel.c_str());
// InputBootArgs->Tag = TAG_INPUT;
InputBootArgs->Row = 0xFFFF; //cursor InputBootArgs->Row = 0xFFFF; //cursor
InputBootArgs->Item = &gSettings.ACPI.DSDT.DSDTPatchArray[Index].PatchDsdtMenuItem; InputBootArgs->Item = &gSettings.ACPI.DSDT.DSDTPatchArray[Index].PatchDsdtMenuItem;
InputBootArgs->AtClick = ActionEnter; InputBootArgs->AtClick = ActionEnter;
@ -2161,7 +2145,6 @@ REFIT_ABSTRACT_MENU_ENTRY* SubMenuDsdts()
for (i = 0; i < DsdtsList.size(); i++) { for (i = 0; i < DsdtsList.size(); i++) {
InputBootArgs = new REFIT_MENU_SWITCH; InputBootArgs = new REFIT_MENU_SWITCH;
InputBootArgs->Title.takeValueFrom(DsdtsList[i]); InputBootArgs->Title.takeValueFrom(DsdtsList[i]);
// InputBootArgs->Tag = TAG_SWITCH_OLD;
InputBootArgs->Row = i + 1; InputBootArgs->Row = i + 1;
InputBootArgs->Item = &InputItems[116]; InputBootArgs->Item = &InputItems[116];
InputBootArgs->AtClick = ActionEnter; InputBootArgs->AtClick = ActionEnter;
@ -2189,7 +2172,6 @@ REFIT_ABSTRACT_MENU_ENTRY* SubMenuACPI()
SubScreen->AddMenuEntry(SubMenuDsdts(), true); SubScreen->AddMenuEntry(SubMenuDsdts(), true);
SubScreen->AddMenuEntry(SubMenuDropTables(), true); SubScreen->AddMenuEntry(SubMenuDropTables(), true);
// SubScreen->AddMenuEntry(SubMenuDropDSM(), true);
SubScreen->AddMenuEntry(SubMenuDsdtFix(), true); SubScreen->AddMenuEntry(SubMenuDsdtFix(), true);
SubScreen->AddMenuEntry(SubMenuDSDTPatches(), true); SubScreen->AddMenuEntry(SubMenuDSDTPatches(), true);
SubScreen->AddMenuItemInput(49, "Fix MCFG", false); SubScreen->AddMenuItemInput(49, "Fix MCFG", false);
@ -2214,7 +2196,6 @@ REFIT_ABSTRACT_MENU_ENTRY* SubMenuAudioPort()
for (i = 0; i < AudioList.size(); i++) { for (i = 0; i < AudioList.size(); i++) {
InputBootArgs = new REFIT_MENU_SWITCH; InputBootArgs = new REFIT_MENU_SWITCH;
InputBootArgs->Title.SWPrintf("%ls_%s", AudioList[i].Name.wc_str(), AudioOutputNames[AudioList[i].Device]); InputBootArgs->Title.SWPrintf("%ls_%s", AudioList[i].Name.wc_str(), AudioOutputNames[AudioList[i].Device]);
// InputBootArgs->Tag = TAG_SWITCH_OLD;
InputBootArgs->Row = i; InputBootArgs->Row = i;
InputBootArgs->Item = &InputItems[119]; InputBootArgs->Item = &InputItems[119];
InputBootArgs->AtClick = ActionEnter; InputBootArgs->AtClick = ActionEnter;
@ -2254,7 +2235,6 @@ void CreateMenuProps(REFIT_MENU_SCREEN* SubScreen, SETTINGS_DATA::DevicesClass::
SubScreen->AddMenuInfo_f(" value: %f", *(float*)Prop->Value.data()); SubScreen->AddMenuInfo_f(" value: %f", *(float*)Prop->Value.data());
break; break;
default: //type data, print first 24 bytes default: //type data, print first 24 bytes
//CHAR8* Bytes2HexStr(UINT8 *data, UINTN len)
SubScreen->AddMenuInfo_f(" value[%zu]: %24s", Prop->Value.size(), Bytes2HexStr((UINT8*)Prop->Value.data(), MIN(24, Prop->Value.size())).c_str()); SubScreen->AddMenuInfo_f(" value[%zu]: %24s", Prop->Value.size(), Bytes2HexStr((UINT8*)Prop->Value.data(), MIN(24, Prop->Value.size())).c_str());
break; break;
} }
@ -2288,43 +2268,10 @@ void CreateMenuAddProp(REFIT_MENU_SCREEN* SubScreen, SETTINGS_DATA::DevicesClass
SubScreen->AddMenuInfo_f(" value: %f", *(float*)Prop->Value.data()); SubScreen->AddMenuInfo_f(" value: %f", *(float*)Prop->Value.data());
break; break;
default: //type data, print first 24 bytes default: //type data, print first 24 bytes
//CHAR8* Bytes2HexStr(UINT8 *data, UINTN len)
SubScreen->AddMenuInfo_f(" value[%zu]: %24s", Prop->Value.size(), Bytes2HexStr((UINT8*)Prop->Value.data(), MIN(24, Prop->Value.size())).c_str()); SubScreen->AddMenuInfo_f(" value[%zu]: %24s", Prop->Value.size(), Bytes2HexStr((UINT8*)Prop->Value.data(), MIN(24, Prop->Value.size())).c_str());
break; break;
} }
} }
//
//REFIT_ABSTRACT_MENU_ENTRY* SubMenuCustomDevices()
//{
// REFIT_MENU_ITEM_OPTIONS *Entry;
// REFIT_MENU_SCREEN *SubScreen;
//
// Entry = newREFIT_MENU_ITEM_OPTIONS(&SubScreen, ActionEnter, SCREEN_DEVICES, "Old Custom properties->"_XS8);
//
// for ( size_t idx = 0 ; idx < gSettings.Devices.newProperties.array.size(); ++idx)
// {
// SETTINGS_DATA::DevicesClass::PropertiesClass::PropertyDict& Prop = gSettings.Devices.newProperties.array[idx];
//
// SubScreen->AddMenuInfo_f("------------");
// SubScreen->AddMenuInfo_f("%ls", Prop.DevicePathAsString.wc_str());
// for ( size_t idxChild = 0 ; idxChild < Prop.propertiesArray.size(); ++idxChild) {
// SETTINGS_DATA::DevicesClass::SimplePropertyClass& Props = Prop.propertiesArray[idxChild];
// CreateMenuProps(SubScreen, &Props);
// }
// }
// for ( size_t idx = 0 ; idx < gSettings.Devices.newArbitrary.size() ; ++idx) {
// SETTINGS_DATA::DevicesClass::ArbitraryProperty& Prop = gSettings.Devices.newArbitrary[idx];
// SubScreen->AddMenuInfo_f("------------");
// for ( size_t idxChild = 0 ; idxChild < Prop.CustomPropertyArray.size(); ++idxChild) {
// SETTINGS_DATA::DevicesClass::SimplePropertyClass& Props = Prop.CustomPropertyArray[idxChild];
// SubScreen->AddMenuInfo_f("%s", Prop.Label.c_str());
// CreateMenuProps(SubScreen, &Props);
// }
// }
// SubScreen->AddMenuEntry(&MenuEntryReturn, false);
// Entry->SubScreen = SubScreen;
// return Entry;
//}
REFIT_ABSTRACT_MENU_ENTRY* SubMenuProperties() REFIT_ABSTRACT_MENU_ENTRY* SubMenuProperties()
{ {
@ -2379,7 +2326,6 @@ REFIT_ABSTRACT_MENU_ENTRY* SubMenuAddProperties()
for ( size_t idx = 0 ; idx < gSettings.Devices.AddPropertyArray.size() ; ++idx) { for ( size_t idx = 0 ; idx < gSettings.Devices.AddPropertyArray.size() ; ++idx) {
SETTINGS_DATA::DevicesClass::AddPropertyClass& Prop = gSettings.Devices.AddPropertyArray[idx]; SETTINGS_DATA::DevicesClass::AddPropertyClass& Prop = gSettings.Devices.AddPropertyArray[idx];
// SubScreen->AddMenuInfo_f("%s", Prop.Label.c_str());
CreateMenuAddProp(SubScreen, &Prop); CreateMenuAddProp(SubScreen, &Prop);
} }
SubScreen->AddMenuEntry(&MenuEntryReturn, false); SubScreen->AddMenuEntry(&MenuEntryReturn, false);
@ -2387,8 +2333,6 @@ REFIT_ABSTRACT_MENU_ENTRY* SubMenuAddProperties()
return Entry; return Entry;
} }
REFIT_ABSTRACT_MENU_ENTRY* SubMenuPCI() REFIT_ABSTRACT_MENU_ENTRY* SubMenuPCI()
{ {
REFIT_MENU_ITEM_OPTIONS *Entry; REFIT_MENU_ITEM_OPTIONS *Entry;
@ -2406,7 +2350,6 @@ REFIT_ABSTRACT_MENU_ENTRY* SubMenuPCI()
SubScreen->AddMenuItemInput(99, "FakeID SATA:", true); SubScreen->AddMenuItemInput(99, "FakeID SATA:", true);
SubScreen->AddMenuItemInput(100, "FakeID XHCI:", true); SubScreen->AddMenuItemInput(100, "FakeID XHCI:", true);
SubScreen->AddMenuItemInput(103, "FakeID IMEI:", true); SubScreen->AddMenuItemInput(103, "FakeID IMEI:", true);
// SubScreen->AddMenuEntry(SubMenuCustomDevices(), true);
SubScreen->AddMenuEntry(SubMenuProperties(), true); SubScreen->AddMenuEntry(SubMenuProperties(), true);
SubScreen->AddMenuEntry(SubMenuArbProperties(), true); SubScreen->AddMenuEntry(SubMenuArbProperties(), true);
SubScreen->AddMenuEntry(SubMenuAddProperties(), true); SubScreen->AddMenuEntry(SubMenuAddProperties(), true);
@ -2433,7 +2376,6 @@ REFIT_ABSTRACT_MENU_ENTRY* SubMenuThemes()
for (i = 0; i < ThemeNameArray.size(); i++) { for (i = 0; i < ThemeNameArray.size(); i++) {
InputBootArgs = new REFIT_MENU_SWITCH; InputBootArgs = new REFIT_MENU_SWITCH;
InputBootArgs->Title.takeValueFrom(ThemeNameArray[i]); InputBootArgs->Title.takeValueFrom(ThemeNameArray[i]);
// InputBootArgs->Tag = TAG_SWITCH_OLD;
InputBootArgs->Row = i + 1; InputBootArgs->Row = i + 1;
InputBootArgs->Item = &InputItems[3]; InputBootArgs->Item = &InputItems[3];
InputBootArgs->AtClick = ActionEnter; InputBootArgs->AtClick = ActionEnter;
@ -2513,7 +2455,6 @@ REFIT_ABSTRACT_MENU_ENTRY* SubMenuBLC()
// create the entry in the main menu // create the entry in the main menu
Entry = newREFIT_MENU_ITEM_OPTIONS(&SubScreen, ActionEnter, SCREEN_BLC, NullXString8); Entry = newREFIT_MENU_ITEM_OPTIONS(&SubScreen, ActionEnter, SCREEN_BLC, NullXString8);
// Entry->Title.SPrintf("boot_args->flags [0x%02hhx]->", gSettings.RtVariables.BooterConfig);
// submenu description // submenu description
SubScreen->AddMenuInfoLine_f("Modify flags for boot.efi"); SubScreen->AddMenuInfoLine_f("Modify flags for boot.efi");
@ -2570,7 +2511,6 @@ REFIT_ABSTRACT_MENU_ENTRY* SubMenuConfigs()
for (i = 0; i < ConfigsList.size(); i++) { for (i = 0; i < ConfigsList.size(); i++) {
InputBootArgs = new REFIT_MENU_SWITCH; InputBootArgs = new REFIT_MENU_SWITCH;
InputBootArgs->Title = ConfigsList[i]; InputBootArgs->Title = ConfigsList[i];
// InputBootArgs->Tag = TAG_SWITCH_OLD;
InputBootArgs->Row = i; InputBootArgs->Row = i;
InputBootArgs->Item = &InputItems[90]; InputBootArgs->Item = &InputItems[90];
InputBootArgs->AtClick = ActionEnter; InputBootArgs->AtClick = ActionEnter;
@ -2605,14 +2545,12 @@ REFIT_ABSTRACT_MENU_ENTRY* SubMenuQuirks()
SubScreen->AddMenuCheck("ProtectMemoryRegions", QUIRK_REGION, 101); SubScreen->AddMenuCheck("ProtectMemoryRegions", QUIRK_REGION, 101);
SubScreen->AddMenuCheck("ProtectSecureBoot", QUIRK_SECURE, 101); SubScreen->AddMenuCheck("ProtectSecureBoot", QUIRK_SECURE, 101);
SubScreen->AddMenuCheck("ProtectUefiServices", QUIRK_UEFI, 101); SubScreen->AddMenuCheck("ProtectUefiServices", QUIRK_UEFI, 101);
// SubScreen->AddMenuItemInput(123, "ProvideConsoleGopEnable", false);
SubScreen->AddMenuCheck("ProvideCustomSlide", QUIRK_CUSTOM, 101); SubScreen->AddMenuCheck("ProvideCustomSlide", QUIRK_CUSTOM, 101);
//decimal //decimal
SubScreen->AddMenuItemInput(122, "ProvideMaxSlide:", true); SubScreen->AddMenuItemInput(122, "ProvideMaxSlide:", true);
SubScreen->AddMenuCheck("RebuildAppleMemoryMap", QUIRK_MAP, 101); SubScreen->AddMenuCheck("RebuildAppleMemoryMap", QUIRK_MAP, 101);
SubScreen->AddMenuItemInput(127, "ResizeAppleGpuBars:", true); SubScreen->AddMenuItemInput(127, "ResizeAppleGpuBars:", true);
SubScreen->AddMenuCheck("SetupVirtualMap", QUIRK_VIRT, 101); SubScreen->AddMenuCheck("SetupVirtualMap", QUIRK_VIRT, 101);
// SubScreen->AddMenuCheck("SignalAppleOS", QUIRK_OS, 101);
SubScreen->AddMenuCheck("SyncRuntimePermissions", QUIRK_PERM, 101); SubScreen->AddMenuCheck("SyncRuntimePermissions", QUIRK_PERM, 101);
SubScreen->AddMenuEntry(&MenuEntryReturn, false); SubScreen->AddMenuEntry(&MenuEntryReturn, false);
@ -2629,10 +2567,6 @@ void OptionsMenu(OUT REFIT_ABSTRACT_MENU_ENTRY **ChosenEntry)
UINTN MenuExit = 0; UINTN MenuExit = 0;
UINTN SubMenuExit; UINTN SubMenuExit;
UINTN NextMenuExit; UINTN NextMenuExit;
//CHAR16* Flags;
// MENU_STYLE_FUNC Style = &REFIT_MENU_SCREEN::TextMenuStyle;
INTN EntryIndex = 0; INTN EntryIndex = 0;
INTN SubEntryIndex = -1; //value -1 means old position to remember INTN SubEntryIndex = -1; //value -1 means old position to remember
INTN NextEntryIndex = -1; INTN NextEntryIndex = -1;
@ -2640,9 +2574,6 @@ void OptionsMenu(OUT REFIT_ABSTRACT_MENU_ENTRY **ChosenEntry)
XBool OldFontStyle = ThemeX.Proportional; XBool OldFontStyle = ThemeX.Proportional;
ThemeX.Proportional = false; //temporary disable proportional ThemeX.Proportional = false; //temporary disable proportional
// if (AllowGraphicsMode) {
// Style = &REFIT_MENU_SCREEN::GraphicsMenuStyle;
// }
// remember, if you extended this menu then change procedures // remember, if you extended this menu then change procedures
// FillInputs and ApplyInputs // FillInputs and ApplyInputs
@ -2658,9 +2589,6 @@ void OptionsMenu(OUT REFIT_ABSTRACT_MENU_ENTRY **ChosenEntry)
OptionMenu.GetAnime(); //false; OptionMenu.GetAnime(); //false;
OptionMenu.AddMenuItemInput(0, "Boot Args:", true); OptionMenu.AddMenuItemInput(0, "Boot Args:", true);
// AddMenuItemInput(&OptionMenu, 90, "Config:", true);
// InputBootArgs->ShortcutDigit = 0xF1;
OptionMenu.AddMenuEntry( SubMenuConfigs(), true); OptionMenu.AddMenuEntry( SubMenuConfigs(), true);
if (AllowGraphicsMode) { if (AllowGraphicsMode) {