From 4b78b07acafee8c8450af9aff929304f14c18bf7 Mon Sep 17 00:00:00 2001 From: Randy Heit Date: Sat, 18 Jun 2011 05:18:28 +0000 Subject: [PATCH] - 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) --- src/win32/fb_d3d9.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/win32/fb_d3d9.cpp b/src/win32/fb_d3d9.cpp index ff1c0d9c61..2c29ac6efa 100644 --- a/src/win32/fb_d3d9.cpp +++ b/src/win32/fb_d3d9.cpp @@ -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); }