DolphinWX: Don't include skipped items in the compression count
This commit is contained in:
parent
8cad70238c
commit
8a2e678ea7
|
@ -1099,22 +1099,28 @@ void CGameListCtrl::OnMultiDecompressISO(wxCommandEvent& /*event*/)
|
|||
|
||||
void CGameListCtrl::CompressSelection(bool _compress)
|
||||
{
|
||||
const std::vector<const GameListItem*> selected_items = GetAllSelectedISOs();
|
||||
std::vector<const GameListItem*> items_to_compress;
|
||||
bool wii_compression_warning_accepted = false;
|
||||
for (const GameListItem* iso : GetAllSelectedISOs())
|
||||
{
|
||||
// Don't include items that we can't do anything with
|
||||
if (iso->GetPlatform() != DiscIO::IVolume::GAMECUBE_DISC && iso->GetPlatform() != DiscIO::IVolume::WII_DISC)
|
||||
continue;
|
||||
if (iso->GetBlobType() != DiscIO::BlobType::PLAIN && iso->GetBlobType() != DiscIO::BlobType::GCZ)
|
||||
continue;
|
||||
|
||||
// If any Wii discs are going to be compressed, show the Wii compression warning once
|
||||
if (_compress)
|
||||
{
|
||||
for (const GameListItem* iso : selected_items)
|
||||
{
|
||||
if (!iso->IsCompressed() && iso->GetPlatform() == DiscIO::IVolume::WII_DISC)
|
||||
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() && iso->GetPlatform() == DiscIO::IVolume::WII_DISC)
|
||||
{
|
||||
if (WiiCompressWarning())
|
||||
break;
|
||||
wii_compression_warning_accepted = true;
|
||||
else
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
wxString dirHome;
|
||||
wxGetHomeDir(&dirHome);
|
||||
|
@ -1138,15 +1144,10 @@ void CGameListCtrl::CompressSelection(bool _compress)
|
|||
wxPD_SMOOTH
|
||||
);
|
||||
|
||||
CompressionProgress progress(0, GetSelectedItemCount(), "", &progressDialog);
|
||||
CompressionProgress progress(0, items_to_compress.size(), "", &progressDialog);
|
||||
|
||||
for (const GameListItem* iso : selected_items)
|
||||
for (const GameListItem* iso : items_to_compress)
|
||||
{
|
||||
if (iso->GetPlatform() != DiscIO::IVolume::GAMECUBE_DISC && iso->GetPlatform() != DiscIO::IVolume::WII_DISC)
|
||||
continue;
|
||||
if (iso->GetBlobType() != DiscIO::BlobType::PLAIN && iso->GetBlobType() != DiscIO::BlobType::GCZ)
|
||||
continue;
|
||||
|
||||
if (!iso->IsCompressed() && _compress)
|
||||
{
|
||||
std::string FileName;
|
||||
|
|
Loading…
Reference in New Issue