From 0d433baeb5b0f0fb19d691d2d7b37ed5fc737535 Mon Sep 17 00:00:00 2001 From: JosJuice Date: Mon, 4 May 2020 18:21:49 +0200 Subject: [PATCH] RVZ: Remove PURGE support PURGE isn't especially useful, while requiring some annoying special handling in the file format. If you want no compression, use NONE. If you want fast compression, use Zstandard. --- Source/Core/DiscIO/WIABlob.cpp | 3 ++- Source/Core/DolphinQt/ConvertDialog.cpp | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Source/Core/DiscIO/WIABlob.cpp b/Source/Core/DiscIO/WIABlob.cpp index b3c9553d49..d5a8086789 100644 --- a/Source/Core/DiscIO/WIABlob.cpp +++ b/Source/Core/DiscIO/WIABlob.cpp @@ -129,7 +129,8 @@ bool WIAFileReader::Initialize(const std::string& path) const u32 compression_type = Common::swap32(m_header_2.compression_type); m_compression_type = static_cast(compression_type); - if (m_compression_type > (m_rvz ? WIACompressionType::Zstd : WIACompressionType::LZMA2)) + if (m_compression_type > (m_rvz ? WIACompressionType::Zstd : WIACompressionType::LZMA2) || + (m_rvz && m_compression_type == WIACompressionType::Purge)) { ERROR_LOG(DISCIO, "Unsupported compression type %u in %s", compression_type, path.c_str()); return false; diff --git a/Source/Core/DolphinQt/ConvertDialog.cpp b/Source/Core/DolphinQt/ConvertDialog.cpp index f739de801a..db801581a0 100644 --- a/Source/Core/DolphinQt/ConvertDialog.cpp +++ b/Source/Core/DolphinQt/ConvertDialog.cpp @@ -226,7 +226,8 @@ void ConvertDialog::OnFormatChanged() const QString slow = tr("%1 (slow)"); AddToCompressionComboBox(tr("No Compression"), DiscIO::WIACompressionType::None); - AddToCompressionComboBox(QStringLiteral("Purge"), DiscIO::WIACompressionType::Purge); + if (format == DiscIO::BlobType::WIA) + AddToCompressionComboBox(QStringLiteral("Purge"), DiscIO::WIACompressionType::Purge); AddToCompressionComboBox(slow.arg(QStringLiteral("bzip2")), DiscIO::WIACompressionType::Bzip2); AddToCompressionComboBox(slow.arg(QStringLiteral("LZMA")), DiscIO::WIACompressionType::LZMA); AddToCompressionComboBox(slow.arg(QStringLiteral("LZMA2")), DiscIO::WIACompressionType::LZMA2);