Author: jgardou Date: Wed Aug 22 16:45:49 2012 New Revision: 57129
URL: http://svn.reactos.org/svn/reactos?rev=57129&view=rev Log: [WIN32K] - Use the right surface for direct DCs in DIB transfer functions It could have changed with a display settings change
Modified: trunk/reactos/win32ss/gdi/ntgdi/dibobj.c
Modified: trunk/reactos/win32ss/gdi/ntgdi/dibobj.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/gdi/ntgdi/dibobj.c?... ============================================================================== --- trunk/reactos/win32ss/gdi/ntgdi/dibobj.c [iso-8859-1] (original) +++ trunk/reactos/win32ss/gdi/ntgdi/dibobj.c [iso-8859-1] Wed Aug 22 16:45:49 2012 @@ -447,8 +447,16 @@ DC_UnlockDc(pDC); goto Exit2; } - - pSurf = pDC->dclevel.pSurface; + + /* + * Select the right surface. + * NOTE: we don't call DC_vPrepareDCsForBlit, because we don't + * care about mouse, visible region or brushes in this API. + */ + if(pDC->dctype == DCTYPE_DIRECT) + pSurf = pDC->ppdev->pSurface; + else + pSurf = pDC->dclevel.pSurface; if (!pSurf) { DC_UnlockDc(pDC); @@ -1113,7 +1121,15 @@ goto cleanup; }
- psurfDst = pdc->dclevel.pSurface; + /* + * Select the right surface. + * NOTE: we don't call DC_vPrepareDCsForBlit, because we don't + * care about mouse, visible region or brushes in this API. + */ + if(pdc->dctype == DCTYPE_DIRECT) + psurfDst = pdc->ppdev->pSurface; + else + psurfDst = pdc->dclevel.pSurface; if (!psurfDst) { // CHECKME