Use libpng for saving images.

TODO: Needs threading done similiar to OGL backend.
Fixes issue 6779.
This commit is contained in:
Matthew Parlane
2013-11-14 21:02:49 +13:00
parent c3069eda28
commit 7e9b970240
6 changed files with 78 additions and 112 deletions

View File

@ -694,7 +694,7 @@ bool Renderer::SaveScreenshot(const std::string &filename, const TargetRectangle
D3D::context->Map(s_screenshot_texture, 0, D3D11_MAP_READ_WRITE, 0, &map);
// ready to be saved
HRESULT hr = D3D::TextureToPng(map, UTF8ToUTF16(filename.c_str()).c_str(), rc.GetWidth(), rc.GetHeight(), false);
HRESULT hr = D3D::TextureToPng(map, filename.c_str(), rc.GetWidth(), rc.GetHeight(), false);
D3D::context->Unmap(s_screenshot_texture, 0);
if (SUCCEEDED(hr))