VirtualBox

儲存庫 vbox 的更動 67556


忽略:
時間撮記:
2017-6-22 上午09:31:21 (7 年 以前)
作者:
vboxsync
訊息:

DevVGA: Always store the virtual height in INDEX_VIRT_HEIGHT except when it can't be represented in 16 bits.

檔案:
修改 1 筆資料

圖例:

未更動
新增
刪除
  • trunk/src/VBox/Devices/Graphics/DevVGA.cpp

    r67478 r67556  
    957957    }
    958958
    959     /* The VBE_DISPI_INDEX_VIRT_HEIGHT is used to prevent setting resolution bigger than VRAM permits
    960      * it is used instead of VBE_DISPI_INDEX_YRES *only* in case
    961      * pThis->vbe_regs[VBE_DISPI_INDEX_VIRT_HEIGHT] < pThis->vbe_regs[VBE_DISPI_INDEX_YRES]
    962      * We can not simply do pThis->vbe_regs[VBE_DISPI_INDEX_VIRT_HEIGHT] = cVirtHeight since
    963      * the cVirtHeight we calculated can exceed the 16bit value range
    964      * instead we'll check if it's bigger than pThis->vbe_regs[VBE_DISPI_INDEX_YRES], and if yes,
    965      * assign the pThis->vbe_regs[VBE_DISPI_INDEX_VIRT_HEIGHT] with a dummy UINT16_MAX value
    966      * that is always bigger than pThis->vbe_regs[VBE_DISPI_INDEX_YRES]
    967      * to just ensure the pThis->vbe_regs[VBE_DISPI_INDEX_YRES] is always used */
    968     pThis->vbe_regs[VBE_DISPI_INDEX_VIRT_HEIGHT] = (cVirtHeight >= (uint32_t)pThis->vbe_regs[VBE_DISPI_INDEX_YRES])
    969                                                  ? UINT16_MAX : (uint16_t)cVirtHeight;
     959    /* The VBE_DISPI_INDEX_VIRT_HEIGHT is used to prevent setting resolution bigger than
     960     * the VRAM size permits. It is used instead of VBE_DISPI_INDEX_YRES *only* in case
     961     * pThis->vbe_regs[VBE_DISPI_INDEX_VIRT_HEIGHT] < pThis->vbe_regs[VBE_DISPI_INDEX_YRES].
     962     * Note that VBE_DISPI_INDEX_VIRT_HEIGHT has to be clipped to UINT16_MAX, which happens
     963     * with small resolutions and big VRAM. */
     964    pThis->vbe_regs[VBE_DISPI_INDEX_VIRT_HEIGHT] = cVirtHeight >= UINT16_MAX ? UINT16_MAX : (uint16_t)cVirtHeight;
    970965}
    971966
注意: 瀏覽 TracChangeset 來幫助您使用更動檢視器

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