From de8fe2c269cf681ffaed684433a379ea81160d17 Mon Sep 17 00:00:00 2001 From: klu2 Date: Tue, 16 Oct 2007 07:01:51 +0000 Subject: Add judgement for TextModeMap git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@4127 6f19259b-4bc3-4df7-8a09-765794883524 --- .../Universal/Console/ConSplitterDxe/ConSplitter.c | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) (limited to 'MdeModulePkg/Universal/Console') diff --git a/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitter.c b/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitter.c index d6c3abd..dc391e3 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; -- cgit v1.1