Changeset 6510 in vbox
- Timestamp:
- Jan 25, 2008 10:56:25 AM (17 years ago)
- svn:sync-xref-src-repo-rev:
- 27519
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/VBoxGuest.h
r6507 r6510 1422 1422 VBGLR3DECL(int) VbglR3VideoAccelEnable(bool fEnable); 1423 1423 VBGLR3DECL(int) VbglR3VideoAccelFlush(void); 1424 VBGLR3DECL(int) VbglR3SetPointerShape(uint32_t fFlags, uint32_t xHot, uint32_t yHot, uint32_t cx, uint32_t cy, const void *pvImg, size_t cb Img);1424 VBGLR3DECL(int) VbglR3SetPointerShape(uint32_t fFlags, uint32_t xHot, uint32_t yHot, uint32_t cx, uint32_t cy, const void *pvImg, size_t cbReq); 1425 1425 /** @} */ 1426 1426 -
trunk/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibVideo.cpp
r6507 r6510 68 68 * @param cy Pointer height. 69 69 * @param pvImg Pointer to the image data (can be NULL). 70 * @param cbImg The size of the image data not including the pre-allocated area. 71 * This should be the size of the image data exceeding the size of 72 * the VMMDevReqMousePointer structure. 70 * @param cbReq The complete size of the request. 73 71 */ 74 VBGLR3DECL(int) VbglR3SetPointerShape(uint32_t fFlags, uint32_t xHot, uint32_t yHot, uint32_t cx, uint32_t cy, const void *pvImg, size_t cb Img)72 VBGLR3DECL(int) VbglR3SetPointerShape(uint32_t fFlags, uint32_t xHot, uint32_t yHot, uint32_t cx, uint32_t cy, const void *pvImg, size_t cbReq) 75 73 { 76 74 VMMDevReqMousePointer *pReq; 77 int rc = vbglR3GRAlloc((VMMDevRequestHeader **)&pReq, sizeof(VMMDevReqMousePointer) + cbImg, VMMDevReq_SetPointerShape);75 int rc = vbglR3GRAlloc((VMMDevRequestHeader **)&pReq, cbReq, VMMDevReq_SetPointerShape); 78 76 if (RT_SUCCESS(rc)) 79 77 { … … 84 82 pReq->height = cy; 85 83 if (pvImg) 86 memcpy(pReq->pointerData, pvImg, sizeof(pReq->pointerData) + cbImg);84 memcpy(pReq->pointerData, pvImg, cbReq - sizeof(VMMDevReqMousePointer) + sizeof(pReq->pointerData)); 87 85 88 86 rc = vbglR3GRPerform(&pReq->header); -
trunk/src/VBox/Additions/x11/xgraphics/vboxutils-new.c
r6508 r6510 366 366 rc = VbglR3SetPointerShape(0, pVBox->reqp->xHot, pVBox->reqp->yHot, pVBox->reqp->width, 367 367 pVBox->reqp->height, pVBox->reqp->pointerData, 368 pVBox->reqp->header.size - pVBox->set_pointer_shape_size);368 pVBox->reqp->header.size); 369 369 if (RT_FAILURE(rc)) 370 370 xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "Could not hide the virtual mouse pointer.\n"); … … 378 378 rc = VbglR3SetPointerShape(VBOX_MOUSE_POINTER_VISIBLE, pVBox->reqp->xHot, pVBox->reqp->yHot, 379 379 pVBox->reqp->width, pVBox->reqp->height, pVBox->reqp->pointerData, 380 pVBox->reqp->header.size - pVBox->set_pointer_shape_size);380 pVBox->reqp->header.size); 381 381 if (RT_FAILURE(rc)) 382 382 xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "Could not unhide the virtual mouse pointer.\n"); … … 397 397 398 398 rc = VbglR3SetPointerShape(reqp->fFlags, reqp->xHot, reqp->yHot, reqp->width, reqp->height, 399 reqp->pointerData, reqp->header.size - pVBox->set_pointer_shape_size);399 reqp->pointerData, reqp->header.size); 400 400 if (RT_FAILURE(rc)) 401 401 xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "Unable to set the virtual mouse pointer image.\n"); … … 708 708 709 709 VbglR3SetPointerShape(VBOX_MOUSE_POINTER_SHAPE | VBOX_MOUSE_POINTER_ALPHA, bitsp->xhot, bitsp->yhot, w, h, 710 pm, reqp->header.size - pVBox->set_pointer_shape_size);710 pm, reqp->header.size); 711 711 xfree(p); 712 712 }
Note:
See TracChangeset
for help on using the changeset viewer.