mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 06:09:50 -06:00
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).
This commit is contained in:
@ -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));
|
||||
|
Reference in New Issue
Block a user