VirtualBox

Ignore:
Timestamp:
Sep 20, 2010 9:55:38 AM (14 years ago)
Author:
vboxsync
Message:

Devices/VMMDev and Additions/common/VBoxGuestLib: get the mouse pointer shape IOCTL size right on the guest side and check it better on the host side

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibVideo.cpp

    r31409 r32631  
    9999{
    100100    VMMDevReqMousePointer *pReq;
    101     int rc = vbglR3GRAlloc((VMMDevRequestHeader **)&pReq, RT_OFFSETOF(VMMDevReqMousePointer, pointerData) + cbImg, VMMDevReq_SetPointerShape);
     101    size_t cbReq = vmmdevGetMousePointerReqSize(cx, cy);
     102    AssertReturn(   !pvImg
     103                 || cbReq == RT_OFFSETOF(VMMDevReqMousePointer, pointerData) + cbImg,
     104                 VERR_INVALID_PARAMETER);
     105    int rc = vbglR3GRAlloc((VMMDevRequestHeader **)&pReq, cbReq,
     106                           VMMDevReq_SetPointerShape);
    102107    if (RT_SUCCESS(rc))
    103108    {
     
    111116
    112117        rc = vbglR3GRPerform(&pReq->header);
    113         vbglR3GRFree(&pReq->header);
    114118        if (RT_SUCCESS(rc))
    115119            rc = pReq->header.rc;
     120        vbglR3GRFree(&pReq->header);
    116121    }
    117122    return rc;
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette