VirtualBox

Ignore:
Timestamp:
Sep 7, 2018 8:15:19 AM (6 years ago)
Author:
vboxsync
Message:

DevVGA: Removed unused argument.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Graphics/DevVGA.cpp

    r73203 r74135  
    974974#endif
    975975
    976 static void recalculate_data(PVGASTATE pThis, bool fVirtHeightOnly)
     976static void recalculate_data(PVGASTATE pThis)
    977977{
    978978    uint16_t cBPP        = pThis->vbe_regs[VBE_DISPI_INDEX_BPP];
     
    986986    Assert(cbLinePitch != 0);
    987987    uint32_t cVirtHeight = pThis->vram_size / cbLinePitch;
    988     if (!fVirtHeightOnly)
    989     {
    990         uint16_t offX        = pThis->vbe_regs[VBE_DISPI_INDEX_X_OFFSET];
    991         uint16_t offY        = pThis->vbe_regs[VBE_DISPI_INDEX_Y_OFFSET];
    992         uint32_t offStart    = cbLinePitch * offY;
    993         if (cBPP == 4)
    994             offStart += offX >> 1;
    995         else
    996             offStart += offX * ((cBPP + 7) >> 3);
    997         offStart >>= 2;
    998         pThis->vbe_line_offset = RT_MIN(cbLinePitch, pThis->vram_size);
    999         pThis->vbe_start_addr  = RT_MIN(offStart, pThis->vram_size);
    1000     }
     988    uint16_t offX        = pThis->vbe_regs[VBE_DISPI_INDEX_X_OFFSET];
     989    uint16_t offY        = pThis->vbe_regs[VBE_DISPI_INDEX_Y_OFFSET];
     990    uint32_t offStart    = cbLinePitch * offY;
     991    if (cBPP == 4)
     992        offStart += offX >> 1;
     993    else
     994        offStart += offX * ((cBPP + 7) >> 3);
     995    offStart >>= 2;
     996    pThis->vbe_line_offset = RT_MIN(cbLinePitch, pThis->vram_size);
     997    pThis->vbe_start_addr  = RT_MIN(offStart, pThis->vram_size);
    1001998
    1002999    /* The VBE_DISPI_INDEX_VIRT_HEIGHT is used to prevent setting resolution bigger than
     
    12301227        if (fRecalculate)
    12311228        {
    1232             recalculate_data(pThis, false);
     1229            recalculate_data(pThis);
    12331230        }
    12341231    }
     
    28172814        SSMR3GetU16(pSSM, &pThis->vbe_regs[i]);
    28182815    if (version_id <= VGA_SAVEDSTATE_VERSION_INV_VHEIGHT)
    2819         recalculate_data(pThis, false); /* <- re-calculate the pThis->vbe_regs[VBE_DISPI_INDEX_VIRT_HEIGHT] since it might be invalid */
     2816        recalculate_data(pThis);    /* <- re-calculate the pThis->vbe_regs[VBE_DISPI_INDEX_VIRT_HEIGHT] since it might be invalid */
    28202817    SSMR3GetU32(pSSM, &pThis->vbe_start_addr);
    28212818    SSMR3GetU32(pSSM, &pThis->vbe_line_offset);
Note: See TracChangeset for help on using the changeset viewer.

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