DolphinWX: Only show Wii compression warning once
When compressing multiple Wii games, the warning used to be showed once for each game. Now it only appears once at the beginning.
This commit is contained in:
parent
bd326ace5c
commit
6a75212e7a
|
@ -1087,6 +1087,23 @@ void CGameListCtrl::OnMultiDecompressISO(wxCommandEvent& /*event*/)
|
|||
|
||||
void CGameListCtrl::CompressSelection(bool _compress)
|
||||
{
|
||||
const std::vector<const GameListItem*> selected_items = GetAllSelectedISOs();
|
||||
|
||||
// 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)
|
||||
{
|
||||
if (WiiCompressWarning())
|
||||
break;
|
||||
else
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
wxString dirHome;
|
||||
wxGetHomeDir(&dirHome);
|
||||
|
||||
|
@ -1113,7 +1130,7 @@ void CGameListCtrl::CompressSelection(bool _compress)
|
|||
m_currentItem = 0;
|
||||
m_numberItem = GetSelectedItemCount();
|
||||
|
||||
for (const GameListItem* iso : GetAllSelectedISOs())
|
||||
for (const GameListItem* iso : selected_items)
|
||||
{
|
||||
if (iso->GetPlatform() != DiscIO::IVolume::GAMECUBE_DISC && iso->GetPlatform() != DiscIO::IVolume::WII_DISC)
|
||||
continue;
|
||||
|
@ -1122,9 +1139,6 @@ void CGameListCtrl::CompressSelection(bool _compress)
|
|||
|
||||
if (!iso->IsCompressed() && _compress)
|
||||
{
|
||||
if (iso->GetPlatform() == DiscIO::IVolume::WII_DISC && !WiiCompressWarning())
|
||||
return;
|
||||
|
||||
std::string FileName, FileExt;
|
||||
SplitPath(iso->GetFileName(), nullptr, &FileName, &FileExt);
|
||||
// Update the file name in the progress dialog
|
||||
|
|
Loading…
Reference in New Issue