diff --git a/Changelog.md b/Changelog.md index 7ff81b7b348a5e3fb37d23a170d699c4de771bff..a2876eee0d043f848bfb57dd87da470cf9c736cc 100644 --- a/Changelog.md +++ b/Changelog.md @@ -8,6 +8,7 @@ OpenCore Changelog - Fixed transparency click detection on OpenCanopy boot entries - Added PCI device info dumping to `SysReport` - Fixed `SetApfsTrimTimeout` on macOS 12 +- Documented and added safe fallback for existing requirement for SetDefault width to match Selector width #### v0.7.0 - Fixed NVRAM reset on firmware with write-protected `BootOptionSupport` diff --git a/Docs/Configuration.tex b/Docs/Configuration.tex index 56b46c339a64690bf6b670cf3f44e39ef00ce7fd..57fc221219c77016daa7130ba5ae692a3cc1d96b 100755 --- a/Docs/Configuration.tex +++ b/Docs/Configuration.tex @@ -6062,6 +6062,7 @@ scaled accordingly for other levels. \item \texttt{Cursor} --- Mouse cursor (mandatory, up to 144x144). \item \texttt{Selected} --- Selected item (mandatory, 144x144). \item \texttt{Selector} --- Selecting item (mandatory, up to 144x40). + \item \texttt{SetDefault} --- Selecting default (mandatory, up to 144x40; must be same width as \texttt{Selector}). \item \texttt{Left} --- Scrolling left (mandatory, 40x40). \item \texttt{Right} --- Scrolling right (mandatory, 40x40). \item \texttt{HardDrive} --- Generic OS (mandatory, 128x128). diff --git a/Platform/OpenCanopy/GuiApp.c b/Platform/OpenCanopy/GuiApp.c index ef56d338c3123f61528f751a7603f6b2fc365b12..a2d27b186d7b81c2e05807311a33f50b38e40e27 100644 --- a/Platform/OpenCanopy/GuiApp.c +++ b/Platform/OpenCanopy/GuiApp.c @@ -534,6 +534,23 @@ InternalContextConstruct ( &Context->Icons[Index][ICON_TYPE_BASE], &mHighlightPixel ); + if (Index == ICON_SET_DEFAULT) { + if (Context->Icons[Index]->Width != Context->Icons[ICON_SELECTOR]->Width) { + Status = EFI_UNSUPPORTED; + DEBUG (( + DEBUG_WARN, + "OCUI: %a width %upx != %a width %upx\n", + mIconNames[Index], + Context->Icons[Index]->Width, + mIconNames[ICON_SELECTOR], + Context->Icons[ICON_SELECTOR]->Width + )); + STATIC_ASSERT ( + ICON_SELECTOR < ICON_SET_DEFAULT, + "Selector must be loaded before SetDefault." + ); + } + } } else if (Index == ICON_GENERIC_HDD && Context->Icons[Index][ICON_TYPE_EXTERNAL].Buffer == NULL) { //