Changeset 72366 in vbox for trunk/src/VBox/Additions/WINNT/VBoxTray/VBoxDispIf.cpp
- Timestamp:
- May 28, 2018 6:05:06 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/WINNT/VBoxTray/VBoxDispIf.cpp
r72351 r72366 1700 1700 } 1701 1701 1702 BOOL vboxDispIfWddmResizeDisplayWin7(PCVBOXDISPIF const pIf, uint32_t c ModeHints, const VBOXDISPLAY_MODEHINT* paModeHints)1703 { 1704 const V BOXDISPLAY_MODEHINT* pHint;1702 BOOL vboxDispIfWddmResizeDisplayWin7(PCVBOXDISPIF const pIf, uint32_t cDispDef, const VMMDevDisplayDef *paDispDef) 1703 { 1704 const VMMDevDisplayDef* pDispDef; 1705 1705 VBOXDISPIF_OP Op; 1706 1706 DWORD winEr = ERROR_SUCCESS; … … 1710 1710 vboxDispIfOpBegin(pIf, &Op); 1711 1711 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)) 1717 1719 { 1718 1720 RTRECTSIZE Size; 1719 1721 1720 Size.cx = p Hint->cx;1721 Size.cy = p Hint->cy;1722 Size.cx = pDispDef->cx; 1723 Size.cy = pDispDef->cy; 1722 1724 1723 1725 vboxDispIfUpdateModesWDDM(&Op, id, &Size); … … 1731 1733 vboxDispIfWddmDcCreate(&DispCfg, QDC_ALL_PATHS); 1732 1734 1733 for (id = 0; id < c ModeHints; ++id)1735 for (id = 0; id < cDispDef; ++id) 1734 1736 { 1735 1737 DISPLAYCONFIG_PATH_INFO *pPathInfo; 1736 1738 1737 p Hint = &paModeHints[id];1739 pDispDef = &paDispDef[id]; 1738 1740 iPath = vboxDispIfWddmDcSearchPath(&DispCfg, id, id); 1739 1741 … … 1744 1746 } 1745 1747 1746 if ( pHint->fModeHintFlags & VBOXDISPLAY_MODEHINT_ACTIVE)1748 if (!(pDispDef->fDisplayFlags & VMMDEV_DISPLAY_DISABLED)) 1747 1749 { 1748 1750 DISPLAYCONFIG_SOURCE_MODE *pSrcMode; … … 1769 1771 pSrcMode->width = 1770 1772 pTgtMode->targetVideoSignalInfo.activeSize.cx = 1771 pTgtMode->targetVideoSignalInfo.totalSize.cx = p Hint->cx;1773 pTgtMode->targetVideoSignalInfo.totalSize.cx = pDispDef->cx; 1772 1774 1773 1775 pSrcMode->height = 1774 1776 pTgtMode->targetVideoSignalInfo.activeSize.cy = 1775 pTgtMode->targetVideoSignalInfo.totalSize.cy = p Hint->cy;1776 1777 pSrcMode->position.x = p Hint->xOrigin;1778 pSrcMode->position.y = p Hint->yOrigin;1779 1780 switch (p Hint->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) 1781 1783 { 1782 1784 case 32: … … 1793 1795 break; 1794 1796 default: 1795 LogRel(("VBoxTray: (WDDM) invalid bpp %d, using 32bpp instead\n", p Hint->cBPP));1797 LogRel(("VBoxTray: (WDDM) invalid bpp %d, using 32bpp instead\n", pDispDef->cBitsPerPixel)); 1796 1798 pSrcMode->pixelFormat = DISPLAYCONFIG_PIXELFORMAT_32BPP; 1797 1799 break; … … 1821 1823 pModeInfoNew->adapterId = pModeInfo[0].adapterId; 1822 1824 pSrcMode = &pModeInfoNew->sourceMode; 1823 pSrcMode->width = p Hint->cx;1824 pSrcMode->height = p Hint->cy;1825 pSrcMode->width = pDispDef->cx; 1826 pSrcMode->height = pDispDef->cy; 1825 1827 pSrcMode->pixelFormat = DISPLAYCONFIG_PIXELFORMAT_32BPP; 1826 pSrcMode->position.x = p Hint->xOrigin;1827 pSrcMode->position.y = p Hint->yOrigin;1828 pSrcMode->position.x = pDispDef->xOrigin; 1829 pSrcMode->position.y = pDispDef->yOrigin; 1828 1830 pPathInfo->sourceInfo.modeInfoIdx = DispCfg.cModeInfoArray; 1829 1831 … … 1834 1836 pModeInfoNew->targetMode = pModeInfo[0].targetMode; 1835 1837 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; 1840 1842 pPathInfo->targetInfo.modeInfoIdx = DispCfg.cModeInfoArray + 1; 1841 1843
Note:
See TracChangeset
for help on using the changeset viewer.