From c87d5352a5508649071e932186aa1c13c113cf53 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20D=C3=B6singer?= Date: Sat, 28 Apr 2007 14:28:55 +0200 Subject: [PATCH] wined3d: Full surface DXTn copy. Height * Pitch is not a valid way to calculate the surface size for DXTn surfaces. Instead of messing with format specific formulas just use the size stored in the destination surface. --- dlls/wined3d/surface_gdi.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/dlls/wined3d/surface_gdi.c b/dlls/wined3d/surface_gdi.c index ce376800f69..9610d427f41 100644 --- a/dlls/wined3d/surface_gdi.c +++ b/dlls/wined3d/surface_gdi.c @@ -555,8 +555,7 @@ IWineGDISurfaceImpl_Blt(IWineD3DSurface *iface, ret = WINED3DERR_WRONGTEXTUREFORMAT; goto release; } - TRACE("Fourcc->Fourcc copy)\n"); - memcpy(dlock.pBits, slock.pBits, This->currentDesc.Height * dlock.Pitch); + memcpy(dlock.pBits, slock.pBits, This->resource.size); goto release; }