summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorklu2 <klu2@6f19259b-4bc3-4df7-8a09-765794883524>2007-02-01 08:42:59 +0000
committerklu2 <klu2@6f19259b-4bc3-4df7-8a09-765794883524>2007-02-01 08:42:59 +0000
commitdb6efc11d350c27308e6e08d542f3f6ef17cd64f (patch)
tree2343e6277ab443b542422c1cb1086b041b81c175
parentca43e86ee7b30851028d2245bd91a52c3954ef1a (diff)
downloadedk2-platforms-db6efc11d350c27308e6e08d542f3f6ef17cd64f.tar.xz
EFI_CONSOLE_CONTROL_PROTOCOL provide the SetMode interface to switch mode between EfiConsoleControlScreenText and EfiConsoleControlScreenGraphics. And implementation of this interface is in EdkModlePkg\Universal\Console\ConSplitter\Dxe\ConSplitterGraphices.c ConSpliterConsoleControlSetMode().
In this function, it is better to judge current mode with wanted mode at first, if current mode is equal to wanted mode, then return and do nothing. Why need add judging: 1) Missing judge will lead an issue that screen splash when pressing key in front page. It is caused by ui.c will switch to textmode when first in, but current mode has been in text mode. 2) If switching to text mode, there are many works want to be done such as EnableCursor, ClearScreen. If original has been in text mode, judging will improve the performance of UI. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2345 6f19259b-4bc3-4df7-8a09-765794883524
-rw-r--r--EdkModulePkg/Universal/Console/ConSplitter/Dxe/ConSplitterGraphics.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/EdkModulePkg/Universal/Console/ConSplitter/Dxe/ConSplitterGraphics.c b/EdkModulePkg/Universal/Console/ConSplitter/Dxe/ConSplitterGraphics.c
index cec8adb2fb..946835ed29 100644
--- a/EdkModulePkg/Universal/Console/ConSplitter/Dxe/ConSplitterGraphics.c
+++ b/EdkModulePkg/Universal/Console/ConSplitter/Dxe/ConSplitterGraphics.c
@@ -116,6 +116,13 @@ ConSpliterConsoleControlSetMode (
return EFI_INVALID_PARAMETER;
}
+ //
+ // Judge current mode with wanted mode at first.
+ //
+ if (Private->ConsoleOutputMode == Mode) {
+ return EFI_SUCCESS;
+ }
+
Supported = FALSE;
TextAndGop = &Private->TextOutList[0];
for (Index = 0; Index < Private->CurrentNumberOfConsoles; Index++, TextAndGop++) {