diff options
author | Matt Fleming <matt.fleming@intel.com> | 2013-01-09 12:21:23 +0000 |
---|---|---|
committer | Matt Fleming <matt.fleming@intel.com> | 2013-01-09 12:21:23 +0000 |
commit | 168255dc63b68714e8296bee38dec09906c9a1ec (patch) | |
tree | e26b3f998e0086b8ef9604fc557cf38d9a75f00a | |
parent | af75baf78acda2f8d1b463cb3c155ab67200e128 (diff) | |
download | syslinux-168255dc63b68714e8296bee38dec09906c9a1ec.tar.gz syslinux-168255dc63b68714e8296bee38dec09906c9a1ec.tar.xz syslinux-168255dc63b68714e8296bee38dec09906c9a1ec.zip |
efi: Fix screen clearing and cursor position
The logic to figure out when to clear the screen was broken, leading
to the screen sometimes containing garbage. x0,y0 are the coordinates
of the upper left part of the screen, and x1,y1 the lower right. x1,y1
will be the position of our cursor, which we can ignore, but we must
use x0,y0 to figure out when to clear the screen and not simply set
the cursor position.
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
-rw-r--r-- | efi/main.c | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -152,11 +152,12 @@ static void efi_erase(const struct term_state *st, * support this so we just set the cursor position unless * we're clearing the whole screen. */ - if (!x0 && !y0 && x1 == (rows - 1) && y1 == (cols - 1)) { + if (!x0 && y0 == (cols - 1)) { /* Really clear the screen */ uefi_call_wrapper(out->ClearScreen, 1, out); - } else - uefi_call_wrapper(out->SetCursorPosition, 3, out, y0, x0); + } else { + uefi_call_wrapper(out->SetCursorPosition, 3, out, y1, x1); + } } static void efi_set_mode(uint16_t mode) |