Am Montag 18 September 2006 10:12 schrieb Christopher GAUTIER:
Hello there,
I've identified a bug in IWineD3DDeviceImpl_CopyRects. When CopyRects() is called to copy the source entirely into the destination surface, and that the sizes matches, a plain memcpy() is done. However, this assumes that the surfaces have the same pitch, and this is not always the case.
Welcome to Wine :-)
IWineD3DDevice::CopyRects is a subset of IWineD3DSurface::BltFast(from DirectDraw), and I thought some time ago I sent a patch which makes CopyRects call BltFast. This patch apparently wasn't applied, and I did a google search for it and couldn't find it either. Looks like I moved it to /dev/null accidentally. We should call BltFast to avoid duplicating code. BltFast is also able to handle corner cases like bad rectangles.
Can you test the attached patch? I have no game which uses CopyRects, so I can't test my patch. This is just a quick per-msdn implementation.
Thanks, Stefan