Api was too confusing for people.

This commit is contained in:
Matthew Parlane
2013-11-17 10:34:34 +13:00
parent 2025f00f88
commit 71d70d896f
7 changed files with 16 additions and 8 deletions

View File

@ -701,6 +701,7 @@ bool Renderer::SaveScreenshot(const std::string &filename, const TargetRectangle
memcpy(data, map.pData, map.RowPitch * rc.GetHeight());
saved_png = TextureToPng(data, map.RowPitch, filename.c_str(), rc.GetWidth(), rc.GetHeight(), false);
delete[] data;
}
D3D::context->Unmap(s_screenshot_texture, 0);

View File

@ -71,6 +71,7 @@ bool TextureCache::TCacheEntry::Save(const char filename[], unsigned int level)
memcpy(data, map.pData, map.RowPitch * desc.Height);
saved_png = TextureToPng(data, map.RowPitch, filename, desc.Width, desc.Height);
delete[] data;
}
D3D::context->Unmap(pNewTexture, 0);
}