aboutsummaryrefslogtreecommitdiffstats
path: root/com32/mboot/initvesa.c
diff options
context:
space:
mode:
authorPaulo Alcantara <pcacjr@zytor.com>2012-05-04 04:43:34 -0300
committerPaulo Alcantara <pcacjr@zytor.com>2012-05-12 00:56:22 -0300
commit124902bbde301d54bc4d4f89040222c75366c639 (patch)
tree9ad8bdd25d6cb6b5d06904e32cee34101c57043e /com32/mboot/initvesa.c
parent9a9334b4260328bce705c610e3a0bc92c71bdd60 (diff)
downloadsyslinux-124902bbde301d54bc4d4f89040222c75366c639.tar.gz
syslinux-124902bbde301d54bc4d4f89040222c75366c639.tar.xz
syslinux-124902bbde301d54bc4d4f89040222c75366c639.zip
graphics: report video mode change from protected-mode code
Syslinux used to call __intcall() for calling routines of the old COMBOOT API to report video mode change (INT 22h, AX=0x0017) that seemed pointless, since INT 22h, AX=0x0017 does call the protected-mode function pm_using_vga() already when calling INT 22h, AX=0x0017. So for reporting video mode changes (VGA in this case) we must call graphics_using_vga() instead for now. Signed-off-by: Paulo Alcantara <pcacjr@zytor.com>
Diffstat (limited to 'com32/mboot/initvesa.c')
-rw-r--r--com32/mboot/initvesa.c19
1 files changed, 8 insertions, 11 deletions
diff --git a/com32/mboot/initvesa.c b/com32/mboot/initvesa.c
index cf2707df..bb3a8467 100644
--- a/com32/mboot/initvesa.c
+++ b/com32/mboot/initvesa.c
@@ -38,6 +38,7 @@
#include <stdlib.h>
#include <string.h>
#include <limits.h>
+#include <graphics.h>
#include "vesa.h"
#include "mboot.h"
@@ -211,16 +212,12 @@ void set_graphics_mode(const struct multiboot_header *mbh,
mbi->vbe_interface_len = rm.ecx.w[0];
}
- /* Tell syslinux we changed video mode */
- rm.eax.w[0] = 0x0017; /* Report video mode change */
/* In theory this should be:
-
- rm.ebx.w[0] = (mi->mode_attr & 4) ? 0x0007 : 0x000f;
-
- However, that would assume all systems that claim to handle text
- output in VESA modes actually do that... */
- rm.ebx.w[0] = 0x000f;
- rm.ecx.w[0] = vesa_info.mi.h_res;
- rm.edx.w[0] = vesa_info.mi.v_res;
- __intcall(0x22, &rm, NULL);
+ *
+ * UsingVga = (mi->mode_attr & 4) ? 0x0007 : 0x000f;
+ *
+ * However, that would assume all systems that claim to handle text
+ * output in VESA modes actually do that...
+ */
+ graphics_using_vga(0x0F, vesa_info.mi.h_res, vesa_info.mi.v_res);
}