diff options
| author | Léo Lam <leo@innovatetechnologi.es> | 2017-10-03 16:45:59 +0200 |
|---|---|---|
| committer | Léo Lam <leo@innovatetechnologi.es> | 2017-10-08 18:31:42 +0200 |
| commit | 239167245dfea23f563429c30d07b3752dd83cad (patch) | |
| tree | 32be96ad26d7cc23ebedfeb2d6323d60dd2be29d /Source/Core/DolphinWX/FrameTools.cpp | |
| parent | 2974c56e500428ef6a769d3eb7f0f17ac74b84de (diff) | |
Add a way to check the NAND for issues and fix them
Old versions of Dolphin are so broken regarding NAND handling that
we need this to repair common issues and avoid issues with titles
like the System Menu or the Wii Shop.
This isn't an exhaustive check, but this will catch most issues
and offer to fix them automatically (if possible).
Diffstat (limited to 'Source/Core/DolphinWX/FrameTools.cpp')
| -rw-r--r-- | Source/Core/DolphinWX/FrameTools.cpp | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/Source/Core/DolphinWX/FrameTools.cpp b/Source/Core/DolphinWX/FrameTools.cpp index e8c7b4f487..cda03e9c6d 100644 --- a/Source/Core/DolphinWX/FrameTools.cpp +++ b/Source/Core/DolphinWX/FrameTools.cpp @@ -185,6 +185,7 @@ void CFrame::BindMenuBarEvents() Bind(wxEVT_MENU, &CFrame::OnInstallWAD, this, IDM_MENU_INSTALL_WAD); Bind(wxEVT_MENU, &CFrame::OnLoadWiiMenu, this, IDM_LOAD_WII_MENU); Bind(wxEVT_MENU, &CFrame::OnImportBootMiiBackup, this, IDM_IMPORT_NAND); + Bind(wxEVT_MENU, &CFrame::OnCheckNAND, this, IDM_CHECK_NAND); Bind(wxEVT_MENU, &CFrame::OnExtractCertificates, this, IDM_EXTRACT_CERTIFICATES); for (const int idm : {IDM_PERFORM_ONLINE_UPDATE_CURRENT, IDM_PERFORM_ONLINE_UPDATE_EUR, IDM_PERFORM_ONLINE_UPDATE_JPN, IDM_PERFORM_ONLINE_UPDATE_KOR, @@ -1308,6 +1309,34 @@ void CFrame::OnImportBootMiiBackup(wxCommandEvent& WXUNUSED(event)) UpdateLoadWiiMenuItem(); } +void CFrame::OnCheckNAND(wxCommandEvent&) +{ + IOS::HLE::Kernel ios; + if (WiiUtils::CheckNAND(ios)) + { + 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) + { + return; + } + + if (WiiUtils::RepairNAND(ios)) + { + wxMessageBox(_("The NAND has been repaired."), _("NAND Check"), wxOK | wxICON_INFORMATION); + return; + } + + wxMessageBox(_("The NAND could not be repaired. It is recommended to back up " + "your current data and start over with a fresh NAND."), + _("NAND Check"), wxOK | wxICON_ERROR); +} + void CFrame::OnExtractCertificates(wxCommandEvent& WXUNUSED(event)) { DiscIO::NANDImporter().ExtractCertificates(File::GetUserPath(D_WIIROOT_IDX)); |
