Browse Source

[fbcon] Always draw cursor using current foreground and background colours

Signed-off-by: Michael Brown <mcb30@ipxe.org>
tags/v1.20.1
Michael Brown 10 years ago
parent
commit
4c51f9602d
1 changed files with 3 additions and 5 deletions
  1. 3
    5
      src/core/fbcon.c

+ 3
- 5
src/core/fbcon.c View File

@@ -340,16 +340,14 @@ static void fbcon_scroll ( struct fbcon *fbcon ) {
340 340
 static void fbcon_draw_cursor ( struct fbcon *fbcon, int show_cursor ) {
341 341
 	struct fbcon_text_cell cell;
342 342
 	size_t offset;
343
-	uint32_t background;
344 343
 
345 344
 	offset = ( ( ( fbcon->ypos * fbcon->character.width ) + fbcon->xpos ) *
346 345
 		   sizeof ( cell ) );
347 346
 	copy_from_user ( &cell, fbcon->text.start, offset, sizeof ( cell ) );
348 347
 	if ( show_cursor ) {
349
-		background = cell.background;
350
-		cell.background = cell.foreground;
351
-		cell.foreground = ( ( background == FBCON_TRANSPARENT ) ?
352
-				    0 : background );
348
+		cell.background = fbcon->foreground;
349
+		cell.foreground = ( ( fbcon->background == FBCON_TRANSPARENT ) ?
350
+				    0 : fbcon->background );
353 351
 	}
354 352
 	fbcon_draw_character ( fbcon, &cell, fbcon->xpos, fbcon->ypos );
355 353
 }

Loading…
Cancel
Save