diff --git a/dlls/wined3d/surface_base.c b/dlls/wined3d/surface_base.c index 57809e1..2ec3a52 100644 --- a/dlls/wined3d/surface_base.c +++ b/dlls/wined3d/surface_base.c @@ -852,7 +852,7 @@ IWineD3DBaseSurfaceImpl_Blt(IWineD3DSurface *iface, if (Src == This) { - IWineD3DSurface_LockRect(iface, &dlock, NULL, 0); + IWineD3DSurface_LockRect(iface, &dlock, DestRect, 0); dfmt = This->resource.format; slock = dlock; sfmt = dfmt; @@ -877,20 +877,26 @@ IWineD3DBaseSurfaceImpl_Blt(IWineD3DSurface *iface, sfmt = Src->resource.format; } sEntry = getFormatDescEntry(sfmt, NULL, NULL); - IWineD3DSurface_LockRect(iface, &dlock,NULL,0); + IWineD3DSurface_LockRect(iface, &dlock, DestRect,0); } if (!DDBltFx || !(DDBltFx->dwDDFX)) Flags &= ~WINEDDBLT_DDFX; if (sEntry->isFourcc && dEntry->isFourcc) - { - memcpy(dlock.pBits, slock.pBits, This->resource.size); - goto release; + { + if (!DestRect) + { + memcpy(dlock.pBits, slock.pBits, This->resource.size); + goto release; + } } if (DestRect) { - xdst = *DestRect; + xdst.top = 0; + xdst.bottom = DestRect->bottom - DestRect->top; + xdst.left = 0; + xdst.right = DestRect->right - DestRect->left; } else {