- Fixed: D3DFB::Draw3DPart() treated the screen's pitch as if it always equaled the width.

Considering this hasn't been guaranteed since before the D3DFB class was even written, this
  should have never made it in as-is.

SVN r3241 (trunk)
This commit is contained in:
Randy Heit 2011-06-18 05:18:28 +00:00
parent 9fc5539ae7
commit 4b78b07aca

View file

@ -1300,7 +1300,7 @@ void D3DFB::Draw3DPart(bool copy3d)
SUCCEEDED(FBTexture->LockRect (0, &lockrect, NULL, D3DLOCK_DISCARD))) ||
SUCCEEDED(FBTexture->LockRect (0, &lockrect, &texrect, 0)))
{
if (lockrect.Pitch == Pitch)
if (lockrect.Pitch == Pitch && Pitch == Width)
{
memcpy (lockrect.pBits, MemBuffer, Width * Height);
}