VirtualBox

Changeset 3428 in vbox


Ignore:
Timestamp:
Jul 4, 2007 5:16:28 PM (18 years ago)
Author:
vboxsync
Message:

bugfix

Location:
trunk/src/VBox/HostServices/SharedOpenGL
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/HostServices/SharedOpenGL/glwindrv.cpp

    r3426 r3428  
    132132    {
    133133        if (pClient->hdc)
    134             DeleteDC(pClient->hdc);
     134            ReleaseDC(pClient->hwnd, pClient->hdc);
    135135        PostMessage(pClient->hwnd, WM_CLOSE, 0, 0);
    136136        pClient->hwnd = 0;
     
    425425    ppfd = (LPPIXELFORMATDESCRIPTOR)pClient->pLastParam;
    426426
     427    hdc = VBOX_OGL_GUEST_TO_HOST_HDC(hdc);
     428    if (!hdc)
     429        hdc = GetDC(0);
     430
    427431    Log(("DrvDescribePixelFormat %x %d %d %x\n", hdc, iPixelFormat, nBytes, ppfd));
    428     pClient->lastretval = DescribePixelFormat(VBOX_OGL_GUEST_TO_HOST_HDC(hdc), iPixelFormat, nBytes, ppfd);
     432    pClient->lastretval = DescribePixelFormat(hdc, iPixelFormat, nBytes, ppfd);
    429433    if (!pClient->lastretval)
    430434        Log(("DescribePixelFormat failed with %d\n", GetLastError()));
    431 }
     435
     436    if (!VBOX_OGL_GUEST_TO_HOST_HDC(hdc))
     437        ReleaseDC(0, pClient->hdc);
     438}
  • trunk/src/VBox/HostServices/SharedOpenGL/service.cpp

    r3399 r3428  
    209209            else
    210210            if (    paParms[0].type != VBOX_HGCM_SVC_PARM_PTR       /* pCmdBuffer */
    211                 ||  paParms[1].type != VBOX_HGCM_SVC_PARM_PTR       /* pLastParam */
    212                 ||  paParms[2].type != VBOX_HGCM_SVC_PARM_32BIT     /* cCommands */
     211                ||  paParms[1].type != VBOX_HGCM_SVC_PARM_32BIT     /* cCommands */
     212                ||  paParms[2].type != VBOX_HGCM_SVC_PARM_PTR       /* pLastParam */
    213213                ||  paParms[3].type != VBOX_HGCM_SVC_PARM_64BIT     /* retval */
    214214                ||  paParms[4].type != VBOX_HGCM_SVC_PARM_32BIT     /* lasterror */
     
    227227
    228228                /* Save the last parameter of the last command in the client structure so the macro can pick it up there */
    229                 pClient->pLastParam  = (uint8_t *)paParms[1].u.pointer.addr;
    230                 pClient->cbLastParam = paParms[1].u.pointer.size;
     229                pClient->pLastParam  = (uint8_t *)paParms[2].u.pointer.addr;
     230                pClient->cbLastParam = paParms[2].u.pointer.size;
    231231
    232232                /* Execute the function. */
  • trunk/src/VBox/HostServices/SharedOpenGL/vboxgl.cpp

    r3338 r3428  
    135135
    136136    *pLastRetVal = pClient->lastretval;
    137     *pLastError  = glGetError();
     137    *pLastError  = 0; //glGetError();
    138138
    139139#ifdef DEBUG
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