NANDImporter: Add support for dumps that don't include keys

This adds support for NAND images that only include the NAND
(i.e. without the OTP/SEEPROM dump appended at the end of the file).
This commit is contained in:
Léo Lam
2017-10-26 21:22:16 +02:00
parent 5d449c00e6
commit 96d7c39891
4 changed files with 56 additions and 20 deletions

View File

@ -1301,7 +1301,14 @@ void CFrame::OnImportBootMiiBackup(wxCommandEvent& WXUNUSED(event))
wxProgressDialog dialog(_("Importing NAND backup"), _("Working..."), 100, this,
wxPD_APP_MODAL | wxPD_ELAPSED_TIME | wxPD_SMOOTH);
DiscIO::NANDImporter().ImportNANDBin(file_name, [&dialog] { dialog.Pulse(); });
DiscIO::NANDImporter().ImportNANDBin(
file_name, [&dialog] { dialog.Pulse(); },
[this] {
return WxStrToStr(wxFileSelector(
_("Select the OTP/SEEPROM dump"), wxEmptyString, wxEmptyString, wxEmptyString,
_("BootMii OTP/SEEPROM dump (*.bin)") + "|*.bin|" + wxGetTranslation(wxALL_FILES),
wxFD_OPEN | wxFD_PREVIEW | wxFD_FILE_MUST_EXIST, this));
});
wxPostEvent(GetMenuBar(), wxCommandEvent{DOLPHIN_EVT_UPDATE_LOAD_WII_MENU_ITEM});
}