aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2007-07-24 17:25:57 -0700
committerH. Peter Anvin <hpa@zytor.com>2007-07-24 17:25:57 -0700
commit427e1fbf892d9134659263d25509b1bf71523f5f (patch)
tree3ae173df3473f5ac05c0846877e3c5088fabeb23
parentdc80d0a4c558ef6f30e943154abeb49e8026848e (diff)
downloadsyslinux-elf-427e1fbf892d9134659263d25509b1bf71523f5f.tar.gz
syslinux-elf-427e1fbf892d9134659263d25509b1bf71523f5f.tar.xz
syslinux-elf-427e1fbf892d9134659263d25509b1bf71523f5f.zip
Correctly handle switches between graphics and text mode
-rw-r--r--com32/lib/sys/ansicon_write.c8
-rw-r--r--com32/modules/menumain.c2
2 files changed, 6 insertions, 4 deletions
diff --git a/com32/lib/sys/ansicon_write.c b/com32/lib/sys/ansicon_write.c
index 4f8eaee0..338bc4b5 100644
--- a/com32/lib/sys/ansicon_write.c
+++ b/com32/lib/sys/ansicon_write.c
@@ -88,15 +88,15 @@ int __ansicon_open(struct file_info *fp)
if ( (signed char)oreg.ebx.b[1] < 0 ) {
ti.disabled = 1;
} else {
+ /* Force text mode */
+ ireg.eax.w[0] = 0x0005;
+ __intcall(0x22, &ireg, NULL);
+
/* Initial state */
ti.rows = BIOS_ROWS ? BIOS_ROWS+1 : 25;
ti.cols = BIOS_COLS;
__ansi_init(&ti);
- /* Force text mode */
- ireg.eax.w[0] = 0x0005;
- __intcall(0x22, &ireg, NULL);
-
/* Get cursor shape and position */
ireg.eax.b[1] = 0x03;
ireg.ebx.b[1] = BIOS_PAGE;
diff --git a/com32/modules/menumain.c b/com32/modules/menumain.c
index 73082f7a..257477b9 100644
--- a/com32/modules/menumain.c
+++ b/com32/modules/menumain.c
@@ -761,6 +761,8 @@ do_hidden_menu(void)
int key;
int timeout_left, this_timeout;
+ clear_screen();
+
if ( !setjmp(timeout_jump) ) {
timeout_left = timeout;