mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-30 04:38:49 +00:00
Add compression option for texture dumps.
Enable through command line options: -C Graphics.Settings.TexturePNGCompressionLevel=[0-9] Or from GFX.ini: [Settings] TexturePNGCompressionLevel=[0-9] @see #10792
This commit is contained in:
parent
6743ca8e09
commit
db712772b7
5 changed files with 7 additions and 4 deletions
|
@ -19,7 +19,7 @@ void AbstractTexture::FinishedRendering()
|
|||
{
|
||||
}
|
||||
|
||||
bool AbstractTexture::Save(const std::string& filename, unsigned int level)
|
||||
bool AbstractTexture::Save(const std::string& filename, unsigned int level, int compression)
|
||||
{
|
||||
// We can't dump compressed textures currently (it would mean drawing them to a RGBA8
|
||||
// framebuffer, and saving that). TextureCache does not call Save for custom textures
|
||||
|
@ -51,7 +51,7 @@ bool AbstractTexture::Save(const std::string& filename, unsigned int level)
|
|||
return Common::SavePNG(filename,
|
||||
reinterpret_cast<const u8*>(readback_texture->GetMappedPointer()),
|
||||
Common::ImageByteFormat::RGBA, level_width, level_height,
|
||||
static_cast<int>(readback_texture->GetMappedStride()));
|
||||
static_cast<int>(readback_texture->GetMappedStride()), compression);
|
||||
}
|
||||
|
||||
bool AbstractTexture::IsCompressedFormat(AbstractTextureFormat format)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue