Commit 84bd4a10 authored by hybrid's avatar hybrid

Simple typo fixed, but screenshot for d3d still does not work correctly.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@892 dfc29bdd-3216-0410-991c-e03cc46cb475
parent 053c54ab
......@@ -2121,7 +2121,7 @@ IImage* CD3D9Driver::createScreenShot()
clientPoint.x = 0;
clientPoint.y = 0;
ClientToScreen((HWND)getExposedVideoData().D3D8.HWnd, &clientPoint);
ClientToScreen((HWND)getExposedVideoData().D3D9.HWnd, &clientPoint);
clientRect.left = clientPoint.x;
clientRect.top = clientPoint.y;
......@@ -2141,14 +2141,10 @@ IImage* CD3D9Driver::createScreenShot()
IImage* newImage = new CImage(ECF_A8R8G8B8, ScreenSize);
// d3d pads the image, so we need to copy the correct number of bytes
u32* pPixels = (u32*)newImage->lock();
if (pPixels)
{
u32* dP = (u32*)newImage->lock();
u8 * sP = (u8 *)lockedRect.pBits;
u32* dP = (u32*)pPixels;
s32 y;
for (y = 0; y < ScreenSize.Height; ++y)
for (s32 y = 0; y < ScreenSize.Height; ++y)
{
memcpy(dP, sP, ScreenSize.Width * 4);
......@@ -2157,7 +2153,6 @@ IImage* CD3D9Driver::createScreenShot()
}
newImage->unlock();
}
// we can unlock and release the surface
lpSurface->UnlockRect();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment