diff options
| author | Léo Lam <leo@leolam.fr> | 2020-12-16 15:34:50 +0100 |
|---|---|---|
| committer | Léo Lam <leo@leolam.fr> | 2020-12-16 16:04:19 +0100 |
| commit | 0ad2f3da454feca1fc9ba9c3f8592e104028b936 (patch) | |
| tree | cd52ccbc1db6a5718f2986a3d4f9ef3cec5a51f6 /Source/Core/VideoCommon/AbstractTexture.cpp | |
| parent | eafe0056721d828636be540cddf3c1226f88f334 (diff) | |
Core: Remove ImageWrite and get rid of -Wmissing-declarations warnings
Diffstat (limited to 'Source/Core/VideoCommon/AbstractTexture.cpp')
| -rw-r--r-- | Source/Core/VideoCommon/AbstractTexture.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/Source/Core/VideoCommon/AbstractTexture.cpp b/Source/Core/VideoCommon/AbstractTexture.cpp index 8e2dc39d76..9b26d55ff8 100644 --- a/Source/Core/VideoCommon/AbstractTexture.cpp +++ b/Source/Core/VideoCommon/AbstractTexture.cpp @@ -5,10 +5,10 @@ #include <algorithm> #include "Common/Assert.h" +#include "Common/Image.h" #include "Common/MsgHandler.h" #include "VideoCommon/AbstractStagingTexture.h" #include "VideoCommon/AbstractTexture.h" -#include "VideoCommon/ImageWrite.h" #include "VideoCommon/RenderBase.h" AbstractTexture::AbstractTexture(const TextureConfig& c) : m_config(c) @@ -48,9 +48,10 @@ bool AbstractTexture::Save(const std::string& filename, unsigned int level) if (!readback_texture->Map()) return false; - return TextureToPng(reinterpret_cast<const u8*>(readback_texture->GetMappedPointer()), - static_cast<int>(readback_texture->GetMappedStride()), filename, level_width, - level_height); + return Common::SavePNG(filename, + reinterpret_cast<const u8*>(readback_texture->GetMappedPointer()), + Common::ImageByteFormat::RGBA, level_width, level_height, + static_cast<int>(readback_texture->GetMappedStride())); } bool AbstractTexture::IsCompressedFormat(AbstractTextureFormat format) |
