DECLCALLBACK(int) vmmdevGetHeightReduction(PPDMIVMMDEVCONNECTOR pInterface, uint32_t *heightReduction) { PDRVMAINVMMDEV pDrv = PDMIVMMDEVCONNECTOR_2_MAINVMMDEV(pInterface); Console *pConsole = pDrv->pVMMDev->getParent(); if (!heightReduction) return VERR_INVALID_PARAMETER; IFramebuffer *framebuffer = pConsole->getDisplay()->getFramebuffer(); if (framebuffer) framebuffer->COMGETTER(HeightReduction)((ULONG*)heightReduction); else *heightReduction = 0; return VINF_SUCCESS; }
DECLCALLBACK(int) vmmdevGetHeightReduction(PPDMIVMMDEVCONNECTOR pInterface, uint32_t *heightReduction) { PDRVMAINVMMDEV pDrv = RT_FROM_MEMBER(pInterface, DRVMAINVMMDEV, Connector); Console *pConsole = pDrv->pVMMDev->getParent(); if (!heightReduction) return VERR_INVALID_PARAMETER; IFramebuffer *framebuffer = NULL; HRESULT hrc = pConsole->i_getDisplay()->QueryFramebuffer(0, &framebuffer); if (SUCCEEDED(hrc) && framebuffer) { framebuffer->COMGETTER(HeightReduction)((ULONG*)heightReduction); framebuffer->Release(); } else *heightReduction = 0; return VINF_SUCCESS; }