提交 1aef0a1e 编写于 作者: M MikeBeaton

OpenCanopy: Document and enforce already existing requirement for...

OpenCanopy: Document and enforce already existing requirement for SetDefault.icns width to match Selector.icns width
(prevent DEBUG Assert or incorrect render in RELEASE)
上级 63edf74d
......@@ -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`
......
......@@ -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).
......
......@@ -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) {
//
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册