summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Brown2013-12-09 16:32:42 +0100
committerMichael Brown2013-12-09 16:34:14 +0100
commit8f0173b5c8ac6de9e9fa8115e37357c2aeb88101 (patch)
tree1b2f39cb8e317249b740116dfae47e065ba1c468
parent[console] Add concept of a "magic" colour (diff)
downloadipxe-8f0173b5c8ac6de9e9fa8115e37357c2aeb88101.tar.gz
ipxe-8f0173b5c8ac6de9e9fa8115e37357c2aeb88101.tar.xz
ipxe-8f0173b5c8ac6de9e9fa8115e37357c2aeb88101.zip
[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>
-rw-r--r--src/arch/i386/interface/pcbios/vesafb.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/arch/i386/interface/pcbios/vesafb.c b/src/arch/i386/interface/pcbios/vesafb.c
index 8fc6f3d41..557f9017b 100644
--- a/src/arch/i386/interface/pcbios/vesafb.c
+++ b/src/arch/i386/interface/pcbios/vesafb.c
@@ -31,6 +31,7 @@ FILE_LICENCE ( GPL2_OR_LATER );
#include <realmode.h>
#include <ipxe/console.h>
#include <ipxe/io.h>
+#include <ipxe/ansicol.h>
#include <ipxe/fbcon.h>
#include <ipxe/vesafb.h>
#include <config/console.h>
@@ -462,6 +463,7 @@ static int vesafb_configure ( struct console_configuration *config ) {
if ( ! vesafb_console.disabled ) {
vesafb_fini();
bios_console.disabled &= ~CONSOLE_DISABLED_OUTPUT;
+ ansicol_reset_magic();
}
vesafb_console.disabled = CONSOLE_DISABLED;
@@ -480,6 +482,10 @@ static int vesafb_configure ( struct console_configuration *config ) {
vesafb_console.disabled = 0;
bios_console.disabled |= CONSOLE_DISABLED_OUTPUT;
+ /* Set magic colour to transparent if we have a background picture */
+ if ( config->pixbuf )
+ ansicol_set_magic_transparent();
+
return 0;
}