From 0ad2f3da454feca1fc9ba9c3f8592e104028b936 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20Lam?= Date: Wed, 16 Dec 2020 15:34:50 +0100 Subject: Core: Remove ImageWrite and get rid of -Wmissing-declarations warnings --- Source/Core/VideoCommon/AbstractTexture.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'Source/Core/VideoCommon/AbstractTexture.cpp') 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 #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(readback_texture->GetMappedPointer()), - static_cast(readback_texture->GetMappedStride()), filename, level_width, - level_height); + return Common::SavePNG(filename, + reinterpret_cast(readback_texture->GetMappedPointer()), + Common::ImageByteFormat::RGBA, level_width, level_height, + static_cast(readback_texture->GetMappedStride())); } bool AbstractTexture::IsCompressedFormat(AbstractTextureFormat format) -- cgit v1.2.3