diff --git a/Changelog.md b/Changelog.md index b652c7d0..e1289933 100644 --- a/Changelog.md +++ b/Changelog.md @@ -8,6 +8,7 @@ OpenCore Changelog - Improved support for overlong menu entries and very narrow console modes in builtin picker - Made `Builtin` text renderer ignore UI Scale, when required to ensure that text mode reaches minimum supported size of 80x25 - Added save and restore of text and graphics mode round tools and failed boot entries +- Updated out-of-range cursor handling to work round minor display issue in memtest86 #### v0.9.2 - Added `DisableIoMapperMapping` quirk, thx @CaseySJ diff --git a/Library/OcConsoleLib/TextOutputBuiltin.c b/Library/OcConsoleLib/TextOutputBuiltin.c index ab11e67d..eca0282d 100644 --- a/Library/OcConsoleLib/TextOutputBuiltin.c +++ b/Library/OcConsoleLib/TextOutputBuiltin.c @@ -1395,6 +1395,20 @@ AsciiTextSetCursorPosition ( } } + // + // Clamping the row here successfully works round a bug in memtest86 where it + // does not re-read console text resolution when it changes the graphics mode. + // If changing between text resolutions >= 80x25, the issue is only visible + // in the position of the footer line on the text UI screen, and this fixes it. + // + if (Column >= mConsoleWidth) { + Column = mConsoleWidth - 1; + } + + if (Row >= mConsoleHeight) { + Row = mConsoleHeight - 1; + } + if ((Column < mConsoleWidth) && (Row < mConsoleHeight)) { FlushCursor (This->Mode->CursorVisible, mPrivateColumn, mPrivateRow); mPrivateColumn = Column;