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

@ -62,7 +62,7 @@ bool TextureCache::TCacheEntry::Save(const char filename[], unsigned int level)
HRESULT hr = D3D::context->Map(pNewTexture, 0, D3D11_MAP_READ_WRITE, 0, &map);
if (SUCCEEDED(hr))
{
hr = D3D::TextureToPng(map, UTF8ToUTF16(filename).c_str(), desc.Width, desc.Height);
hr = D3D::TextureToPng(map, filename, desc.Width, desc.Height);
D3D::context->Unmap(pNewTexture, 0);
}
SAFE_RELEASE(pNewTexture);