Browse Source

[vesafb] Set "magic" colour to transparent when a background picture is used

Use the magic colour facility to cause the user interface background
to become transparent when we have a background picture.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
tags/v1.20.1
Michael Brown 10 years ago
parent
commit
8f0173b5c8
1 changed files with 6 additions and 0 deletions
  1. 6
    0
      src/arch/i386/interface/pcbios/vesafb.c

+ 6
- 0
src/arch/i386/interface/pcbios/vesafb.c View File

@@ -31,6 +31,7 @@ FILE_LICENCE ( GPL2_OR_LATER );
31 31
 #include <realmode.h>
32 32
 #include <ipxe/console.h>
33 33
 #include <ipxe/io.h>
34
+#include <ipxe/ansicol.h>
34 35
 #include <ipxe/fbcon.h>
35 36
 #include <ipxe/vesafb.h>
36 37
 #include <config/console.h>
@@ -462,6 +463,7 @@ static int vesafb_configure ( struct console_configuration *config ) {
462 463
 	if ( ! vesafb_console.disabled ) {
463 464
 		vesafb_fini();
464 465
 		bios_console.disabled &= ~CONSOLE_DISABLED_OUTPUT;
466
+		ansicol_reset_magic();
465 467
 	}
466 468
 	vesafb_console.disabled = CONSOLE_DISABLED;
467 469
 
@@ -480,6 +482,10 @@ static int vesafb_configure ( struct console_configuration *config ) {
480 482
 	vesafb_console.disabled = 0;
481 483
 	bios_console.disabled |= CONSOLE_DISABLED_OUTPUT;
482 484
 
485
+	/* Set magic colour to transparent if we have a background picture */
486
+	if ( config->pixbuf )
487
+		ansicol_set_magic_transparent();
488
+
483 489
 	return 0;
484 490
 }
485 491
 

Loading…
Cancel
Save