DolphinWX: Remove usage of IsCompressed() in compression code

What we actually care about is whether it's a GCZ file,
not whether it's compressed. (This commit doesn't change
the behavior, since the beginning of CompressSelection
discards items that aren't BlobType::GCZ or BlobType::PLAIN.)
This commit is contained in:
JosJuice 2017-02-20 16:08:07 +01:00
parent b1589a6337
commit a7e11db4bf
3 changed files with 4 additions and 10 deletions

View File

@ -1215,7 +1215,8 @@ void CGameListCtrl::CompressSelection(bool _compress)
items_to_compress.push_back(iso);
// Show the Wii compression warning if it's relevant and it hasn't been shown already
if (!wii_compression_warning_accepted && _compress && !iso->IsCompressed() &&
if (!wii_compression_warning_accepted && _compress &&
iso->GetBlobType() != DiscIO::BlobType::GCZ &&
iso->GetPlatform() == DiscIO::Platform::WII_DISC)
{
if (WiiCompressWarning())
@ -1246,7 +1247,7 @@ void CGameListCtrl::CompressSelection(bool _compress)
for (const GameListItem* iso : items_to_compress)
{
if (!iso->IsCompressed() && _compress)
if (iso->GetBlobType() != DiscIO::BlobType::GCZ && _compress)
{
std::string FileName;
SplitPath(iso->GetFileName(), nullptr, &FileName, nullptr);
@ -1268,7 +1269,7 @@ void CGameListCtrl::CompressSelection(bool _compress)
(iso->GetPlatform() == DiscIO::Platform::WII_DISC) ? 1 : 0,
16384, &MultiCompressCB, &progress);
}
else if (iso->IsCompressed() && !_compress)
else if (iso->GetBlobType() == DiscIO::BlobType::GCZ && !_compress)
{
std::string FileName;
SplitPath(iso->GetFileName(), nullptr, &FileName, nullptr);

View File

@ -386,9 +386,3 @@ const std::string GameListItem::GetWiiFSPath() const
return ret;
}
bool GameListItem::IsCompressed() const
{
return m_blob_type == DiscIO::BlobType::GCZ || m_blob_type == DiscIO::BlobType::CISO ||
m_blob_type == DiscIO::BlobType::WBFS;
}

View File

@ -53,7 +53,6 @@ public:
DiscIO::BlobType GetBlobType() const { return m_blob_type; }
const std::string& GetIssues() const { return m_issues; }
int GetEmuState() const { return m_emu_state; }
bool IsCompressed() const;
u64 GetFileSize() const { return m_FileSize; }
u64 GetVolumeSize() const { return m_VolumeSize; }
// 0 is the first disc, 1 is the second disc