Changeset 72366 in vbox
- Timestamp:
- May 28, 2018 6:05:06 PM (7 years ago)
- svn:sync-xref-src-repo-rev:
- 122823
- Location:
- trunk/src/VBox/Additions/WINNT
- Files:
-
- 3 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 -
trunk/src/VBox/Additions/WINNT/VBoxTray/VBoxDisplay.cpp
r72352 r72366 892 892 aDisplays[i].cy, 893 893 aDisplays[i].cBitsPerPixel)); 894 895 doResize(pCtx,896 aDisplays[i].idDisplay,897 (aDisplays[i].fDisplayFlags & VMMDEV_DISPLAY_CX) ? aDisplays[i].cx : 0,898 (aDisplays[i].fDisplayFlags & VMMDEV_DISPLAY_CY) ? aDisplays[i].cy : 0,899 (aDisplays[i].fDisplayFlags & VMMDEV_DISPLAY_BPP) ? aDisplays[i].cBitsPerPixel : 0,900 !RT_BOOL(aDisplays[i].fDisplayFlags & VMMDEV_DISPLAY_DISABLED),901 aDisplays[i].xOrigin,902 aDisplays[i].yOrigin,903 RT_BOOL(aDisplays[i].fDisplayFlags & VMMDEV_DISPLAY_ORIGIN));904 894 } 895 896 vboxDispIfWddmResizeDisplayWin7(&pCtx->pEnv->dispIf, cDisplays, &aDisplays[0]); 905 897 906 898 continue; /* Done */ -
trunk/src/VBox/Additions/WINNT/include/VBoxDisplay.h
r72346 r72366 20 20 #include <iprt/types.h> 21 21 #include <iprt/assert.h> 22 23 typedef enum24 {25 VBOXDISPLAY_MODEHINT_ACTIVE = 0x00000001,26 VBOXDISPLAY_MODEHINT_PRIMARY = 0x00000002,27 VBOXDISPLAY_MODEHINT_MASK = 0x0000000328 } VBOXDISPLAY_MODEHINT_FLAGS;29 30 typedef struct _VBOXDISPLAY_MODEHINT31 {32 uint32_t idTarget;33 int32_t xOrigin;34 int32_t yOrigin;35 uint32_t cx;36 uint32_t cy;37 uint32_t cBPP;38 VBOXDISPLAY_MODEHINT_FLAGS fModeHintFlags;39 } VBOXDISPLAY_MODEHINT;40 22 41 23 #define VBOXESC_SETVISIBLEREGION 0xABCD9001
Note:
See TracChangeset
for help on using the changeset viewer.