mirror of
https://github.com/acidanthera/OpenCorePkg.git
synced 2025-12-08 19:25:01 +00:00
OpenCoreMisc: Support ConsoleMode configuration option
This commit is contained in:
parent
c87d0fe735
commit
2872d4f11c
Binary file not shown.
@ -1206,6 +1206,15 @@ behaviour that does not go to any other sections
|
||||
|
||||
\begin{enumerate}
|
||||
|
||||
\item
|
||||
\texttt{ConsoleMode}\\
|
||||
\textbf{Type}: \texttt{plist\ string}\\
|
||||
\textbf{Default value}: Empty string\\
|
||||
\textbf{Description}: Sets console output mode as specified
|
||||
with the \texttt{WxH} (e.g. \texttt{80x24}) formatted string.
|
||||
Set to empty string not to change console mode. Set to \texttt{Max}
|
||||
to try to use largest available console mode.
|
||||
|
||||
\item
|
||||
\texttt{HideSelf}\\
|
||||
\textbf{Type}: \texttt{plist\ boolean}\\
|
||||
|
||||
@ -353,6 +353,8 @@
|
||||
<dict>
|
||||
<key>Boot</key>
|
||||
<dict>
|
||||
<key>ConsoleMode</key>
|
||||
<string></string>
|
||||
<key>HideSelf</key>
|
||||
<true/>
|
||||
<key>ReinstallProtocol</key>
|
||||
|
||||
@ -209,5 +209,36 @@ OcMiscLateInit (
|
||||
));
|
||||
}
|
||||
|
||||
ParseConsoleMode (
|
||||
OC_BLOB_GET (&Config->Misc.Boot.ConsoleMode),
|
||||
&Width,
|
||||
&Height,
|
||||
&SetMax
|
||||
);
|
||||
|
||||
DEBUG ((
|
||||
DEBUG_INFO,
|
||||
"OC: Requested console mode is %u:%u@%u (max: %d) from %a\n",
|
||||
Width,
|
||||
Height,
|
||||
Bpp,
|
||||
SetMax,
|
||||
OC_BLOB_GET (&Config->Misc.Boot.ConsoleMode)
|
||||
));
|
||||
|
||||
if (SetMax || (Width > 0 && Height > 0)) {
|
||||
Status = SetConsoleMode (Width, Height);
|
||||
DEBUG ((
|
||||
EFI_ERROR (Status) ? DEBUG_WARN : DEBUG_INFO,
|
||||
"OC: Changed console mode to %u:%u@%u (max: %d) from %a - %r\n",
|
||||
Width,
|
||||
Height,
|
||||
Bpp,
|
||||
SetMax,
|
||||
OC_BLOB_GET (&Config->Misc.Boot.ConsoleMode),
|
||||
Status
|
||||
));
|
||||
}
|
||||
|
||||
return Status;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user