浏览代码

[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 年前
父节点
当前提交
8f0173b5c8
共有 1 个文件被更改,包括 6 次插入0 次删除
  1. 6
    0
      src/arch/i386/interface/pcbios/vesafb.c

+ 6
- 0
src/arch/i386/interface/pcbios/vesafb.c 查看文件

31
 #include <realmode.h>
31
 #include <realmode.h>
32
 #include <ipxe/console.h>
32
 #include <ipxe/console.h>
33
 #include <ipxe/io.h>
33
 #include <ipxe/io.h>
34
+#include <ipxe/ansicol.h>
34
 #include <ipxe/fbcon.h>
35
 #include <ipxe/fbcon.h>
35
 #include <ipxe/vesafb.h>
36
 #include <ipxe/vesafb.h>
36
 #include <config/console.h>
37
 #include <config/console.h>
462
 	if ( ! vesafb_console.disabled ) {
463
 	if ( ! vesafb_console.disabled ) {
463
 		vesafb_fini();
464
 		vesafb_fini();
464
 		bios_console.disabled &= ~CONSOLE_DISABLED_OUTPUT;
465
 		bios_console.disabled &= ~CONSOLE_DISABLED_OUTPUT;
466
+		ansicol_reset_magic();
465
 	}
467
 	}
466
 	vesafb_console.disabled = CONSOLE_DISABLED;
468
 	vesafb_console.disabled = CONSOLE_DISABLED;
467
 
469
 
480
 	vesafb_console.disabled = 0;
482
 	vesafb_console.disabled = 0;
481
 	bios_console.disabled |= CONSOLE_DISABLED_OUTPUT;
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
 	return 0;
489
 	return 0;
484
 }
490
 }
485
 
491
 

正在加载...
取消
保存