diff options
author | Michael Brown | 2013-12-08 02:28:50 +0100 |
---|---|---|
committer | Michael Brown | 2013-12-09 16:34:07 +0100 |
commit | 4c51f9602d4d96f38504a1b9e80b67e4a44c62c8 (patch) | |
tree | b7bca56d82618f508f26236e1f60c1fedaaa4b0f /src/core/fbcon.c | |
parent | [lkrnprefix] Include iPXE version string in image header (diff) | |
download | ipxe-4c51f9602d4d96f38504a1b9e80b67e4a44c62c8.tar.gz ipxe-4c51f9602d4d96f38504a1b9e80b67e4a44c62c8.tar.xz ipxe-4c51f9602d4d96f38504a1b9e80b67e4a44c62c8.zip |
[fbcon] Always draw cursor using current foreground and background colours
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/core/fbcon.c')
-rw-r--r-- | src/core/fbcon.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/core/fbcon.c b/src/core/fbcon.c index 90786fe0..df287078 100644 --- a/src/core/fbcon.c +++ b/src/core/fbcon.c @@ -340,16 +340,14 @@ static void fbcon_scroll ( struct fbcon *fbcon ) { static void fbcon_draw_cursor ( struct fbcon *fbcon, int show_cursor ) { struct fbcon_text_cell cell; size_t offset; - uint32_t background; offset = ( ( ( fbcon->ypos * fbcon->character.width ) + fbcon->xpos ) * sizeof ( cell ) ); copy_from_user ( &cell, fbcon->text.start, offset, sizeof ( cell ) ); if ( show_cursor ) { - background = cell.background; - cell.background = cell.foreground; - cell.foreground = ( ( background == FBCON_TRANSPARENT ) ? - 0 : background ); + cell.background = fbcon->foreground; + cell.foreground = ( ( fbcon->background == FBCON_TRANSPARENT ) ? + 0 : fbcon->background ); } fbcon_draw_character ( fbcon, &cell, fbcon->xpos, fbcon->ypos ); } |