diff options
author | Erwan Velu <erwan.velu@free.fr> | 2009-04-06 12:58:11 +0200 |
---|---|---|
committer | Erwan Velu <erwan.velu@free.fr> | 2009-04-06 12:58:11 +0200 |
commit | 91d9f6799af81567fef2770c45379cf61daccd11 (patch) | |
tree | 33454411ec27f39c565c891039b5f423acfad5db | |
parent | f13aac7a7e24f3b48168afb14b2eb714db5ea5a9 (diff) | |
download | syslinux-91d9f6799af81567fef2770c45379cf61daccd11.tar.gz |
hdt: Don't display unsupported modes
Impact: Prevent from displaying 0x0 modes
Some vesa bioses reports 0x0 modes, no need to display them
-rw-r--r-- | com32/hdt/hdt-cli-vesa.c | 3 | ||||
-rw-r--r-- | com32/hdt/hdt-menu-vesa.c | 3 |
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", |