summaryrefslogtreecommitdiff
path: root/Source/Core
diff options
context:
space:
mode:
authorPierre Bourdon <delroth@gmail.com>2015-11-01 05:28:15 +0100
committerPierre Bourdon <delroth@gmail.com>2015-11-01 05:28:15 +0100
commit491e1495458e692feacba9dfc3e9ffbc7f17cebb (patch)
tree177e829becf955046bbab3a1648ac0dda8d3f467 /Source/Core
parentb14f5424bf9b289603ef4c9ee1bb640f1bc76dc2 (diff)
parent013d55227b30ea50c6cf9235dd7f9a19210bd1e3 (diff)
Merge pull request #3216 from aserna3/WiiDiscWarning
[DolphinWX] Added warning to Wii disc compression
Diffstat (limited to 'Source/Core')
-rw-r--r--Source/Core/DolphinWX/GameListCtrl.cpp17
-rw-r--r--Source/Core/DolphinWX/GameListCtrl.h1
2 files changed, 16 insertions, 2 deletions
diff --git a/Source/Core/DolphinWX/GameListCtrl.cpp b/Source/Core/DolphinWX/GameListCtrl.cpp
index c056d1756c..25ae8b4ce6 100644
--- a/Source/Core/DolphinWX/GameListCtrl.cpp
+++ b/Source/Core/DolphinWX/GameListCtrl.cpp
@@ -1080,6 +1080,9 @@ 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);
m_currentFilename = FileName;
@@ -1093,7 +1096,7 @@ void CGameListCtrl::CompressSelection(bool _compress)
if (File::Exists(OutputFileName) &&
wxMessageBox(
wxString::Format(_("The file %s already exists.\nDo you wish to replace it?"),
- StrToWxStr(OutputFileName)),
+ StrToWxStr(OutputFileName)),
_("Confirm File Overwrite"),
wxYES_NO) == wxNO)
continue;
@@ -1121,7 +1124,7 @@ void CGameListCtrl::CompressSelection(bool _compress)
if (File::Exists(OutputFileName) &&
wxMessageBox(
wxString::Format(_("The file %s already exists.\nDo you wish to replace it?"),
- StrToWxStr(OutputFileName)),
+ StrToWxStr(OutputFileName)),
_("Confirm File Overwrite"),
wxYES_NO) == wxNO)
continue;
@@ -1178,6 +1181,9 @@ void CGameListCtrl::OnCompressISO(wxCommandEvent& WXUNUSED (event))
}
else
{
+ if (iso->GetPlatform() == DiscIO::IVolume::WII_DISC && !WiiCompressWarning())
+ return;
+
path = wxFileSelector(
_("Save compressed GCM/ISO"),
StrToWxStr(FilePath),
@@ -1292,3 +1298,10 @@ void CGameListCtrl::UnselectAll()
SetItemState(i, 0, wxLIST_STATE_SELECTED);
}
}
+bool CGameListCtrl::WiiCompressWarning()
+{
+ return wxMessageBox(
+ _("Compressing a Wii disc image will irreversibly change the compressed copy by removing padding data. Your disc image will still work. Continue?"),
+ _("Warning"),
+ wxYES_NO) == wxYES;
+}
diff --git a/Source/Core/DolphinWX/GameListCtrl.h b/Source/Core/DolphinWX/GameListCtrl.h
index fb504d267b..19f38bbcb5 100644
--- a/Source/Core/DolphinWX/GameListCtrl.h
+++ b/Source/Core/DolphinWX/GameListCtrl.h
@@ -107,4 +107,5 @@ private:
static size_t m_numberItem;
static bool CompressCB(const std::string& text, float percent, void* arg);
static bool MultiCompressCB(const std::string& text, float percent, void* arg);
+ static bool WiiCompressWarning();
};