diff options
Diffstat (limited to 'Source/Core/DolphinWX/FrameTools.cpp')
| -rw-r--r-- | Source/Core/DolphinWX/FrameTools.cpp | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/Source/Core/DolphinWX/FrameTools.cpp b/Source/Core/DolphinWX/FrameTools.cpp index 996c7770a6..9dd9c7a9a2 100644 --- a/Source/Core/DolphinWX/FrameTools.cpp +++ b/Source/Core/DolphinWX/FrameTools.cpp @@ -53,6 +53,8 @@ #include "DiscIO/NANDContentLoader.h" #include "DiscIO/NANDImporter.h" +#include "DiscIO/VolumeCreator.h" +#include "DiscIO/VolumeWad.h" #include "DolphinWX/AboutDolphin.h" #include "DolphinWX/Cheats/CheatsWindow.h" @@ -1228,6 +1230,31 @@ void CFrame::OnInstallWAD(wxCommandEvent& event) } } +void CFrame::OnUninstallWAD(wxCommandEvent&) +{ + const GameListItem* file = m_GameListCtrl->GetSelectedISO(); + if (!file) + return; + + if (!AskYesNoT("Uninstalling the WAD will remove the currently installed version " + "of this title from the NAND without deleting its save data. Continue?")) + { + return; + } + + const auto volume = DiscIO::CreateVolumeFromFilename(file->GetFileName()); + u64 title_id; + volume->GetTitleID(&title_id); + if (!DiscIO::CNANDContentManager::Access().RemoveTitle(title_id, Common::FROM_CONFIGURED_ROOT)) + { + PanicAlertT("Failed to remove this title from the NAND."); + return; + } + + if (title_id == TITLEID_SYSMENU) + UpdateLoadWiiMenuItem(); +} + void CFrame::OnImportBootMiiBackup(wxCommandEvent& WXUNUSED(event)) { if (!AskYesNoT("Merging a new NAND over your currently selected NAND will overwrite any channels " |
