VirtualBox

Ignore:
Timestamp:
May 28, 2018 6:05:06 PM (7 years ago)
Author:
vboxsync
Message:

WDDM/VBoxTray: bugref:8444, VMMDevDisplayDef is used instead of VBOXDISPLAY_MODEHINT

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/WINNT/VBoxTray/VBoxDispIf.cpp

    r72351 r72366  
    17001700}
    17011701
    1702 BOOL vboxDispIfWddmResizeDisplayWin7(PCVBOXDISPIF const pIf, uint32_t cModeHints, const VBOXDISPLAY_MODEHINT* paModeHints)
    1703 {
    1704     const VBOXDISPLAY_MODEHINT* pHint;
     1702BOOL vboxDispIfWddmResizeDisplayWin7(PCVBOXDISPIF const pIf, uint32_t cDispDef, const VMMDevDisplayDef *paDispDef)
     1703{
     1704    const VMMDevDisplayDef* pDispDef;
    17051705    VBOXDISPIF_OP Op;
    17061706    DWORD winEr = ERROR_SUCCESS;
     
    17101710    vboxDispIfOpBegin(pIf, &Op);
    17111711
    1712     for (id = 0; id < cModeHints; ++id)
    1713     {
    1714         pHint = &paModeHints[id];
    1715 
    1716         if (pHint->fModeHintFlags & VBOXDISPLAY_MODEHINT_ACTIVE)
     1712    for (id = 0; id < cDispDef; ++id)
     1713    {
     1714        pDispDef = &paDispDef[id];
     1715
     1716        if (!(pDispDef->fDisplayFlags & VMMDEV_DISPLAY_DISABLED) &&
     1717             (pDispDef->fDisplayFlags | VMMDEV_DISPLAY_CX) ||
     1718             (pDispDef->fDisplayFlags | VMMDEV_DISPLAY_CY))
    17171719        {
    17181720            RTRECTSIZE Size;
    17191721
    1720             Size.cx = pHint->cx;
    1721             Size.cy = pHint->cy;
     1722            Size.cx = pDispDef->cx;
     1723            Size.cy = pDispDef->cy;
    17221724
    17231725            vboxDispIfUpdateModesWDDM(&Op, id, &Size);
     
    17311733    vboxDispIfWddmDcCreate(&DispCfg, QDC_ALL_PATHS);
    17321734
    1733     for (id = 0; id < cModeHints; ++id)
     1735    for (id = 0; id < cDispDef; ++id)
    17341736    {
    17351737        DISPLAYCONFIG_PATH_INFO *pPathInfo;
    17361738
    1737         pHint = &paModeHints[id];
     1739        pDispDef = &paDispDef[id];
    17381740        iPath = vboxDispIfWddmDcSearchPath(&DispCfg, id, id);
    17391741
     
    17441746        }
    17451747
    1746         if (pHint->fModeHintFlags & VBOXDISPLAY_MODEHINT_ACTIVE)
     1748        if (!(pDispDef->fDisplayFlags & VMMDEV_DISPLAY_DISABLED))
    17471749        {
    17481750            DISPLAYCONFIG_SOURCE_MODE *pSrcMode;
     
    17691771                pSrcMode->width =
    17701772                    pTgtMode->targetVideoSignalInfo.activeSize.cx =
    1771                     pTgtMode->targetVideoSignalInfo.totalSize.cx  = pHint->cx;
     1773                    pTgtMode->targetVideoSignalInfo.totalSize.cx  = pDispDef->cx;
    17721774
    17731775                pSrcMode->height =
    17741776                    pTgtMode->targetVideoSignalInfo.activeSize.cy =
    1775                     pTgtMode->targetVideoSignalInfo.totalSize.cy  = pHint->cy;
    1776 
    1777                 pSrcMode->position.x = pHint->xOrigin;
    1778                 pSrcMode->position.y = pHint->yOrigin;
    1779 
    1780                 switch (pHint->cBPP)
     1777                    pTgtMode->targetVideoSignalInfo.totalSize.cy  = pDispDef->cy;
     1778
     1779                pSrcMode->position.x = pDispDef->xOrigin;
     1780                pSrcMode->position.y = pDispDef->yOrigin;
     1781
     1782                switch (pDispDef->cBitsPerPixel)
    17811783                {
    17821784                case 32:
     
    17931795                    break;
    17941796                default:
    1795                     LogRel(("VBoxTray: (WDDM) invalid bpp %d, using 32bpp instead\n", pHint->cBPP));
     1797                    LogRel(("VBoxTray: (WDDM) invalid bpp %d, using 32bpp instead\n", pDispDef->cBitsPerPixel));
    17961798                    pSrcMode->pixelFormat = DISPLAYCONFIG_PIXELFORMAT_32BPP;
    17971799                    break;
     
    18211823                pModeInfoNew->adapterId = pModeInfo[0].adapterId;
    18221824                pSrcMode = &pModeInfoNew->sourceMode;
    1823                 pSrcMode->width  = pHint->cx;
    1824                 pSrcMode->height = pHint->cy;
     1825                pSrcMode->width  = pDispDef->cx;
     1826                pSrcMode->height = pDispDef->cy;
    18251827                pSrcMode->pixelFormat = DISPLAYCONFIG_PIXELFORMAT_32BPP;
    1826                 pSrcMode->position.x = pHint->xOrigin;
    1827                 pSrcMode->position.y = pHint->yOrigin;
     1828                pSrcMode->position.x = pDispDef->xOrigin;
     1829                pSrcMode->position.y = pDispDef->yOrigin;
    18281830                pPathInfo->sourceInfo.modeInfoIdx = DispCfg.cModeInfoArray;
    18291831
     
    18341836                pModeInfoNew->targetMode = pModeInfo[0].targetMode;
    18351837                pTgtMode = &pModeInfoNew->targetMode;
    1836                 pTgtMode->targetVideoSignalInfo.activeSize.cx = pHint->cx;
    1837                 pTgtMode->targetVideoSignalInfo.totalSize.cx  = pHint->cx;
    1838                 pTgtMode->targetVideoSignalInfo.activeSize.cy = pHint->cy;
    1839                 pTgtMode->targetVideoSignalInfo.totalSize.cy  = pHint->cy;
     1838                pTgtMode->targetVideoSignalInfo.activeSize.cx =
     1839                    pTgtMode->targetVideoSignalInfo.totalSize.cx = pDispDef->cx;
     1840                pTgtMode->targetVideoSignalInfo.activeSize.cy =
     1841                    pTgtMode->targetVideoSignalInfo.totalSize.cy  = pDispDef->cy;
    18401842                pPathInfo->targetInfo.modeInfoIdx = DispCfg.cModeInfoArray + 1;
    18411843
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