diff options
| author | Léo Lam <leo@innovatetechnologi.es> | 2017-10-06 21:45:28 +0200 |
|---|---|---|
| committer | Léo Lam <leo@innovatetechnologi.es> | 2017-10-08 18:57:58 +0200 |
| commit | 02e17594b06151e652a1b51ce1018ce4747feecd (patch) | |
| tree | ddeb6c96b916e2f827d1b2341c1f31aea4afd67f /Source/Core/DolphinWX/FrameTools.cpp | |
| parent | e1c0b8d01124f13d07d0b7bd0e271e88b1178d0d (diff) | |
WiiUtils: Attempt to fix the NAND more aggressively
Change the repair logic to fix issues more aggressively by deleting bad
titles. This is necessary because of a bug in Dolphin's WAD boot code.
The UI code was updated to inform the user about titles that will be
deleted if they continue a repair, before deleting anything.
Diffstat (limited to 'Source/Core/DolphinWX/FrameTools.cpp')
| -rw-r--r-- | Source/Core/DolphinWX/FrameTools.cpp | 26 |
1 files changed, 20 insertions, 6 deletions
diff --git a/Source/Core/DolphinWX/FrameTools.cpp b/Source/Core/DolphinWX/FrameTools.cpp index cda03e9c6d..592f338cd2 100644 --- a/Source/Core/DolphinWX/FrameTools.cpp +++ b/Source/Core/DolphinWX/FrameTools.cpp @@ -1312,20 +1312,34 @@ void CFrame::OnImportBootMiiBackup(wxCommandEvent& WXUNUSED(event)) void CFrame::OnCheckNAND(wxCommandEvent&) { IOS::HLE::Kernel ios; - if (WiiUtils::CheckNAND(ios)) + WiiUtils::NANDCheckResult result = WiiUtils::CheckNAND(ios); + if (!result.bad) { wxMessageBox(_("No issues have been detected."), _("NAND Check"), wxOK | wxICON_INFORMATION); return; } - if (wxMessageBox("The emulated NAND is damaged. System titles such as the Wii Menu and " - "the Wii Shop Channel may not work correctly.\n\n" - "Do you want to try to repair the NAND?", - _("NAND Check"), wxYES_NO) != wxYES) + wxString message = _("The emulated NAND is damaged. System titles such as the Wii Menu and " + "the Wii Shop Channel may not work correctly.\n\n" + "Do you want to try to repair the NAND?"); + if (!result.titles_to_remove.empty()) { - return; + message += _("\n\nWARNING: Fixing this NAND requires the deletion of titles that have " + "incomplete data on the NAND, including all associated save data. " + "By continuing, the following title(s) will be removed:\n\n"); + Core::TitleDatabase title_db; + for (const u64 title_id : result.titles_to_remove) + { + const std::string name = title_db.GetTitleName(title_id); + message += !name.empty() ? StringFromFormat("%s (%016" PRIx64 ")", name.c_str(), title_id) : + StringFromFormat("%016" PRIx64, title_id); + message += "\n"; + } } + if (wxMessageBox(message, _("NAND Check"), wxYES_NO) != wxYES) + return; + if (WiiUtils::RepairNAND(ios)) { wxMessageBox(_("The NAND has been repaired."), _("NAND Check"), wxOK | wxICON_INFORMATION); |
