VirtualBox

Changeset 67812 in vbox


Ignore:
Timestamp:
Jul 6, 2017 7:13:21 AM (8 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
116737
Message:

VGABIOS: VBE function 6 needs to fail if requested width causes virtual height to be too low.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Graphics/BIOS/vbe.c

    r67548 r67812  
    119119    out_w(VBE_DISPI_IOPORT_INDEX, VBE_DISPI_INDEX_YRES);
    120120    out_w(VBE_DISPI_IOPORT_DATA, yres);
     121}
     122
     123static uint16_t dispi_get_yres(void)
     124{
     125    out_w(VBE_DISPI_IOPORT_INDEX, VBE_DISPI_INDEX_YRES);
     126    return in_w(VBE_DISPI_IOPORT_DATA);
    121127}
    122128
     
    745751    uint8_t     bpp;
    746752    uint8_t     subfn;
     753    uint16_t    old_vw;
    747754
    748755    bpp    = dispi_get_bpp();
     756    old_vw = dispi_get_virt_width();
    749757    result = 0x004F;
    750758    val    = *CX;
     
    773781        *BX = val;                          /* Bytes per scanline. */
    774782        *DX = dispi_get_virt_height();      /* Height in lines. */
     783        if (*DX < dispi_get_yres()) {
     784            dispi_set_virt_width(old_vw);
     785            result = 0x200;
     786        }
    775787        break;
    776788    default:
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette