- Timestamp:
- Feb 25, 2020 6:19:56 PM (5 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/vmm/pdmifs.h
r83142 r83156 712 712 713 713 /** 714 * Notify the graphics device about the monitor positions since the ones we get from vmwgfx FIFO are not correct. In an ideal 715 * universe this method should not be here. 716 * 717 * @param pInterface Pointer to this interface. 718 * @param cPositions Number of monitor positions 719 * @param pPosition Monitor positions (offsets/origins) array 714 * Notify the graphics device about the monitor positions since the ones we get 715 * from vmwgfx FIFO are not correct. 716 * 717 * In an ideal universe this method should not be here. 718 * 719 * @param pInterface Pointer to this interface. 720 * @param cPositions Number of monitor positions. 721 * @param paPositions Monitor positions (offsets/origins) array. 720 722 * @thread Any. 721 723 */ 722 DECLR3CALLBACKMEMBER(void, pfnReportMonitorPositions, (PPDMIDISPLAYPORT pInterface, uint32_t cPositions, PRTPOINT pPosition)); 724 DECLR3CALLBACKMEMBER(void, pfnReportMonitorPositions, (PPDMIDISPLAYPORT pInterface, uint32_t cPositions, 725 PCRTPOINT paPositions)); 723 726 724 727 } PDMIDISPLAYPORT; -
trunk/src/VBox/Devices/Graphics/DevVGA-SVGA.cpp
r83154 r83156 712 712 713 713 #endif /* LOG_ENABLED */ 714 715 714 #ifdef IN_RING3 715 716 716 /** 717 717 * @interface_method_impl{PDMIDISPLAYPORT,pfnSetViewport} … … 767 767 # endif 768 768 } 769 769 770 770 771 /** … … 832 833 } 833 834 835 834 836 /** 835 * Used to update screen offsets (positions) since appearently vmwgfx fails to pass correct offsets thru FIFO.837 * @interface_method_impl{PDMIDISPLAYPORT,pfnReportMonitorPositions} 836 838 * 837 * @param pInterface The device instance. 838 * @param cPositions The size of the pPosition array 839 * @param pPosition Monitor positions. We assume for the disable monitors the positions is (-1, -1) 840 */ 841 DECLCALLBACK(void) vmsvgaR3PortReportMonitorPositions(PPDMIDISPLAYPORT pInterface, uint32_t cPositions, PRTPOINT pPosition) 839 * Used to update screen offsets (positions) since appearently vmwgfx fails to 840 * pass correct offsets thru FIFO. 841 */ 842 DECLCALLBACK(void) vmsvgaR3PortReportMonitorPositions(PPDMIDISPLAYPORT pInterface, uint32_t cPositions, PCRTPOINT paPositions) 842 843 { 843 PVGASTATECC pThisCC = RT_FROM_MEMBER(pInterface, VGASTATECC, IPort); 844 PVGASTATE pThis = PDMDEVINS_2_DATA(pThisCC->pDevIns, PVGASTATE); 845 846 847 PVMSVGAR3STATE pSVGAState = pThisCC->svga.pSvgaR3State; 848 size_t cScreenCount = RT_ELEMENTS(pSVGAState->aScreens); 849 850 VMSVGASCREENOBJECT *pScreens = pSVGAState->aScreens; 851 /* We assume cPositions is the # of outputs Xserver reports and pPosition is (-1, -1) for disabled monitors. */ 852 for (unsigned i = 0; i < cPositions; ++i) 853 { 854 /* Stop walking the array once we go thru all the monitors. */ 855 if (i >= cScreenCount) 856 break; 857 if ( pScreens[i].xOrigin == -1 858 || pScreens[i].yOrigin == -1) 844 PVGASTATECC pThisCC = RT_FROM_MEMBER(pInterface, VGASTATECC, IPort); 845 PVGASTATE pThis = PDMDEVINS_2_DATA(pThisCC->pDevIns, PVGASTATE); 846 PVMSVGAR3STATE pSVGAState = pThisCC->svga.pSvgaR3State; 847 848 /* We assume cPositions is the # of outputs Xserver reports and paPositions is (-1, -1) for disabled monitors. */ 849 cPositions = RT_MIN(cPositions, RT_ELEMENTS(pSVGAState->aScreens)); 850 for (uint32_t i = 0; i < cPositions; ++i) 851 { 852 if ( pSVGAState->aScreens[i].xOrigin == paPositions[i].x 853 && pSVGAState->aScreens[i].yOrigin == paPositions[i].y) 859 854 continue; 860 if ( pScreens[i].xOrigin == pPosition[i].x 861 && pScreens[i].yOrigin == pPosition[i].y)855 856 if (pSVGAState->aScreens[i].xOrigin == -1) 862 857 continue; 863 pScreens[i].xOrigin = pPosition[i].x; 864 pScreens[i].yOrigin = pPosition[i].y; 865 pScreens[i].fModified = true; 866 } 858 if (pSVGAState->aScreens[i].yOrigin == -1) 859 continue; 860 861 pSVGAState->aScreens[i].xOrigin = paPositions[i].x; 862 pSVGAState->aScreens[i].yOrigin = paPositions[i].y; 863 pSVGAState->aScreens[i].fModified = true; 864 } 865 867 866 vmsvgaR3VBVAResize(pThis, pThisCC); 868 867 } 868 869 869 #endif /* IN_RING3 */ 870 870 -
trunk/src/VBox/Devices/Graphics/DevVGA-SVGA.h
r83142 r83156 393 393 DECLCALLBACK(void) vmsvgaR3PortSetViewport(PPDMIDISPLAYPORT pInterface, uint32_t uScreenId, 394 394 uint32_t x, uint32_t y, uint32_t cx, uint32_t cy); 395 DECLCALLBACK(void) vmsvgaR3PortReportMonitorPositions(PPDMIDISPLAYPORT pInterface, uint32_t cPositions, P RTPOINT pPosition);395 DECLCALLBACK(void) vmsvgaR3PortReportMonitorPositions(PPDMIDISPLAYPORT pInterface, uint32_t cPositions, PCRTPOINT paPositions); 396 396 397 397 int vmsvgaR3Init(PPDMDEVINS pDevIns);
Note:
See TracChangeset
for help on using the changeset viewer.