mirror of
https://github.com/PCSX2/pcsx2.git
synced 2026-11-16 03:00:36 +01:00
gsdx: Allow screenshot compression level to be changed
At higher resolutions it takes too much time to save a screenshot at the maximum compression level. So let's allow the user to set the compression level. This re-uses the png_compression_level setting. The default compression level is 1 for speed, but if the user wishes to increase the compression level (without using an external tool) and doesn't mind if the screenshot takes more time to save then they can increase the compression level up to a maximum of 9 (which can take quite a while). Fixes #1527.
This commit is contained in:
1 parent
d6b834e8af
commit
2b2042e1c2
12 files changed
+17
-17
No files matched your search
@@ -85,7 +85,7 @@ void GSTextureSW::Unmap()
|
||||
m_mapped.clear(std::memory_order_release);
|
||||
}
|
||||
|
||||
bool GSTextureSW::Save(const string& fn, bool user_image, bool dds)
|
||||
bool GSTextureSW::Save(const string& fn, bool dds)
|
||||
{
|
||||
if(dds) return false; // not implemented
|
||||
|
||||
@@ -94,6 +94,6 @@ bool GSTextureSW::Save(const string& fn, bool user_image, bool dds)
|
||||
#else
|
||||
GSPng::Format fmt = GSPng::RGB_PNG;
|
||||
#endif
|
||||
int compression = user_image ? Z_BEST_COMPRESSION : theApp.GetConfigI("png_compression_level");
|
||||
int compression = theApp.GetConfigI("png_compression_level");
|
||||
return GSPng::Save(fmt, fn, static_cast<uint8*>(m_data), m_size.x, m_size.y, m_pitch, compression);
|
||||
}
|
||||
Reference in new issue
Block a user