- Timestamp:
- Jul 11, 2007 3:34:59 PM (18 years ago)
- Location:
- trunk/src/VBox
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/VMMDev/VBoxDev.cpp
r3409 r3556 1083 1083 1084 1084 requestHeader->rc = VINF_SUCCESS; 1085 } 1086 break; 1087 } 1088 1089 case VMMDevReq_VideoSetVisibleRect: 1090 { 1091 if (requestHeader->size < sizeof(VMMDevVideoSetVisibleRect)) 1092 { 1093 Log(("VMMDevReq_VideoSetVisibleRect request size too small!!!\n")); 1094 requestHeader->rc = VERR_INVALID_PARAMETER; 1095 } 1096 else if (!pData->pDrv) 1097 { 1098 Log(("VMMDevReq_VideoSetVisibleRect Connector is NULL!!!\n")); 1099 requestHeader->rc = VERR_NOT_SUPPORTED; 1100 } 1101 else 1102 { 1103 VMMDevVideoSetVisibleRect *ptr = (VMMDevVideoSetVisibleRect *)requestHeader; 1104 1105 if (!ptr->cRect) 1106 { 1107 Log(("VMMDevReq_VideoSetVisibleRect no rectangles!!!\n")); 1108 requestHeader->rc = VERR_INVALID_PARAMETER; 1109 } 1110 else 1111 if (requestHeader->size != sizeof(VMMDevReq_VideoSetVisibleRect) + (ptr->cRect-1)*sizeof(RTRECT)) 1112 { 1113 Log(("VMMDevReq_VideoSetVisibleRect request size too small!!!\n")); 1114 requestHeader->rc = VERR_INVALID_PARAMETER; 1115 } 1116 else 1117 { 1118 /* forward the call */ 1119 requestHeader->rc = pData->pDrv->pfnSetVisibleRegion(pData->pDrv, ptr->cRect, &ptr->Rect); 1120 } 1085 1121 } 1086 1122 break; -
trunk/src/VBox/Main/VMMDevInterface.cpp
r3347 r3556 299 299 } 300 300 301 DECLCALLBACK(int) vmmdevSetVisibleRegion(PPDMIVMMDEVCONNECTOR pInterface, uint32_t cRect, PRTRECT pRect) 302 { 303 PDRVMAINVMMDEV pDrv = PDMIVMMDEVCONNECTOR_2_MAINVMMDEV(pInterface); 304 305 if (!cRect) 306 return VERR_INVALID_PARAMETER; 307 IFramebuffer *framebuffer = pDrv->pVMMDev->getParent()->getDisplay()->getFramebuffer(); 308 if (framebuffer) 309 framebuffer->SetVisibleRegion(cRect, (BYTE *)pRect); 310 311 return VINF_SUCCESS; 312 } 313 314 DECLCALLBACK(int) vmmdevQueryVisibleRegion(PPDMIVMMDEVCONNECTOR pInterface, uint32_t *pcRect, PRTRECT pRect) 315 { 316 PDRVMAINVMMDEV pDrv = PDMIVMMDEVCONNECTOR_2_MAINVMMDEV(pInterface); 317 318 IFramebuffer *framebuffer = pDrv->pVMMDev->getParent()->getDisplay()->getFramebuffer(); 319 if (framebuffer) 320 { 321 ULONG cRect = 0; 322 framebuffer->QueryVisibleRegion(&cRect, (BYTE *)pRect); 323 324 *pcRect = cRect; 325 } 326 327 return VINF_SUCCESS; 328 } 329 301 330 #ifdef VBOX_HGCM 302 331 … … 485 514 pData->Connector.pfnGetHeightReduction = vmmdevGetHeightReduction; 486 515 pData->Connector.pfnSetCredentialsJudgementResult = vmmdevSetCredentialsJudgementResult; 516 pData->Connector.pfnSetVisibleRegion = vmmdevSetVisibleRegion; 517 pData->Connector.pfnQueryVisibleRegion = vmmdevQueryVisibleRegion; 518 487 519 488 520 #ifdef VBOX_HGCM
Note:
See TracChangeset
for help on using the changeset viewer.