summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2009-04-06 16:56:51 -0700
committerH. Peter Anvin <hpa@zytor.com>2009-04-06 16:56:51 -0700
commitdd4ac3e0a81559e760a7b3fc88092f44a0c25c4d (patch)
tree57ceb02ad200886976e28462264fe16f8d0b8e10
parentc09f6943822b508ed76277eb48a50b51c5dc484a (diff)
parent91d9f6799af81567fef2770c45379cf61daccd11 (diff)
downloadsyslinux-dd4ac3e0a81559e760a7b3fc88092f44a0c25c4d.tar.gz
Merge commit 'hdt/master'
-rw-r--r--com32/hdt/hdt-cli-vesa.c3
-rw-r--r--com32/hdt/hdt-menu-vesa.c3
2 files changed, 6 insertions, 0 deletions
diff --git a/com32/hdt/hdt-cli-vesa.c b/com32/hdt/hdt-cli-vesa.c
index db7642d2..202b75f1 100644
--- a/com32/hdt/hdt-cli-vesa.c
+++ b/com32/hdt/hdt-cli-vesa.c
@@ -61,6 +61,9 @@ void show_vesa_modes(struct s_hardware *hardware) {
for (int i=0;i<hardware->vesa.vmi_count;i++) {
struct vesa_mode_info *mi=&hardware->vesa.vmi[i].mi;
+ /* Sometimes, vesa bios reports 0x0 modes
+ * We don't need to display that ones */
+ if ((mi->h_res==0) || (mi->v_res==0)) continue;
more_printf("%5u %5u %3u %3d 0x%04x\n",
mi->h_res, mi->v_res, mi->bpp, hardware->vesa.vmi[i].mode+0x200,hardware->vesa.vmi[i].mode);
}
diff --git a/com32/hdt/hdt-menu-vesa.c b/com32/hdt/hdt-menu-vesa.c
index 2d807aaa..ed03ff22 100644
--- a/com32/hdt/hdt-menu-vesa.c
+++ b/com32/hdt/hdt-menu-vesa.c
@@ -79,6 +79,9 @@ void compute_vesa_modes(struct s_my_menu *menu, struct s_hardware *hardware) {
set_menu_pos(SUBMENU_Y,SUBMENU_X);
for (int i=0;i<hardware->vesa.vmi_count;i++) {
struct vesa_mode_info *mi=&hardware->vesa.vmi[i].mi;
+ /* Sometimes, vesa bios reports 0x0 modes
+ * We don't need to display that ones */
+ if ((mi->h_res==0) || (mi->v_res==0)) continue;
snprintf(buffer,sizeof buffer,"%4u x %4u x %2ubits vga=%3d",
mi->h_res, mi->v_res, mi->bpp, hardware->vesa.vmi[i].mode+0x200);
snprintf(statbuffer,sizeof statbuffer,"%4ux%4ux%2ubits vga=%3d",