summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitter.c
diff options
context:
space:
mode:
Diffstat (limited to 'MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitter.c')
-rw-r--r--MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitter.c21
1 files changed, 18 insertions, 3 deletions
diff --git a/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitter.c b/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitter.c
index d6c3abd9e2..dc391e33bc 100644
--- a/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitter.c
+++ b/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitter.c
@@ -3460,11 +3460,26 @@ ConSplitterTextOutSetCursorPosition (
EFI_STATUS ReturnStatus;
UINTN MaxColumn;
UINTN MaxRow;
+ INT32 *TextOutModeMap;
+ INT32 ModeNumber;
+ INT32 CurrentMode;
Private = TEXT_OUT_SPLITTER_PRIVATE_DATA_FROM_THIS (This);
-
- MaxColumn = Private->TextOutQueryData[Private->TextOutMode.Mode].Columns;
- MaxRow = Private->TextOutQueryData[Private->TextOutMode.Mode].Rows;
+ TextOutModeMap = NULL;
+ ModeNumber = Private->TextOutMode.Mode;
+
+ //
+ // Get current MaxColumn and MaxRow from intersection map
+ //
+ if (Private->TextOutModeMap != NULL) {
+ TextOutModeMap = Private->TextOutModeMap + Private->TextOutListCount * ModeNumber;
+ CurrentMode = *TextOutModeMap;
+ } else {
+ CurrentMode = ModeNumber;
+ }
+
+ MaxColumn = Private->TextOutQueryData[CurrentMode].Columns;
+ MaxRow = Private->TextOutQueryData[CurrentMode].Rows;
if (Column >= MaxColumn || Row >= MaxRow) {
return EFI_UNSUPPORTED;