X-Git-Url: https://code.delx.au/refind/blobdiff_plain/f27ce23381e3d1c3bc4f37d74fb6e70a3babc5dd..c8883302f06e69a8b961280b73e29b4b09cacb9d:/refind/config.c diff --git a/refind/config.c b/refind/config.c index ba0c06b..731adb7 100644 --- a/refind/config.c +++ b/refind/config.c @@ -35,7 +35,7 @@ */ /* - * Modifications copyright (c) 2012-2014 Roderick W. Smith + * Modifications copyright (c) 2012-2015 Roderick W. Smith * * Modifications distributed under the terms of the GNU General Public * License (GPL) version 3 (GPLv3), a copy of which must be distributed @@ -64,7 +64,8 @@ #define GetTime ST->RuntimeServices->GetTime #define LAST_MINUTE 1439 /* Last minute of a day */ -static REFIT_MENU_ENTRY MenuEntryReturn = { L"Return to Main Menu", TAG_RETURN, 0, 0, 0, NULL, NULL, NULL }; +extern REFIT_MENU_ENTRY MenuEntryReturn; +//static REFIT_MENU_ENTRY MenuEntryReturn = { L"Return to Main Menu", TAG_RETURN, 0, 0, 0, NULL, NULL, NULL }; // // read a file into a buffer @@ -475,8 +476,12 @@ VOID ReadConfig(CHAR16 *FileName) } // if if (!FileExists(SelfDir, FileName)) { - Print(L"Configuration file '%s' missing!\n", FileName); - return; + Print(L"Configuration file '%s' missing!\n", FileName); + if (!FileExists(SelfDir, L"icons")) { + Print(L"Icons directory doesn't exist; setting textonly = TRUE!\n"); + GlobalConfig.TextOnly = TRUE; + } + return; } Status = ReadFile(SelfDir, FileName, &File, &i); @@ -510,6 +515,8 @@ VOID ReadConfig(CHAR16 *FileName) GlobalConfig.HideUIFlags |= HIDEUI_FLAG_EDITOR; } else if (StriCmp(FlagName, L"safemode") == 0) { GlobalConfig.HideUIFlags |= HIDEUI_FLAG_SAFEMODE; + } else if (StriCmp(FlagName, L"badges") == 0) { + GlobalConfig.HideUIFlags |= HIDEUI_FLAG_BADGES; } else if (StriCmp(FlagName, L"all") == 0) { GlobalConfig.HideUIFlags = HIDEUI_FLAG_ALL; } else { @@ -585,6 +592,8 @@ VOID ReadConfig(CHAR16 *FileName) GlobalConfig.ShowTools[i - 1] = TAG_FIRMWARE; } else if ((StriCmp(FlagName, L"memtest86") == 0) || (StriCmp(FlagName, L"memtest") == 0)) { GlobalConfig.ShowTools[i - 1] = TAG_MEMTEST; + } else if (StriCmp(FlagName, L"netboot") == 0) { + GlobalConfig.ShowTools[i - 1] = TAG_NETBOOT; } else { Print(L" unknown showtools flag: '%s'\n", FlagName); } @@ -685,6 +694,11 @@ VOID ReadConfig(CHAR16 *FileName) if ((GlobalConfig.DontScanFiles) && (GlobalConfig.WindowsRecoveryFiles)) MergeStrings(&(GlobalConfig.DontScanFiles), GlobalConfig.WindowsRecoveryFiles, L','); MyFreePool(File.Buffer); + + if (!FileExists(SelfDir, L"icons") && !FileExists(SelfDir, GlobalConfig.IconsDir)) { + Print(L"Icons directory doesn't exist; setting textonly = TRUE!\n"); + GlobalConfig.TextOnly = TRUE; + } } /* VOID ReadConfig() */ // Finds a volume with the specified Identifier (a filesystem label, a