mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-22 05:40:01 -06:00
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:
@ -51,6 +51,7 @@
|
||||
#include "DolphinQt2/NetPlay/NetPlayDialog.h"
|
||||
#include "DolphinQt2/NetPlay/NetPlaySetupDialog.h"
|
||||
#include "DolphinQt2/QtUtils/QueueOnObject.h"
|
||||
#include "DolphinQt2/QtUtils/RunOnObject.h"
|
||||
#include "DolphinQt2/QtUtils/WindowActivationEventFilter.h"
|
||||
#include "DolphinQt2/Resources.h"
|
||||
#include "DolphinQt2/Settings.h"
|
||||
@ -879,13 +880,24 @@ void MainWindow::OnImportNANDBackup()
|
||||
auto beginning = QDateTime::currentDateTime().toMSecsSinceEpoch();
|
||||
|
||||
auto result = std::async(std::launch::async, [&] {
|
||||
DiscIO::NANDImporter().ImportNANDBin(file.toStdString(), [&dialog, beginning] {
|
||||
QueueOnObject(dialog, [&dialog, beginning] {
|
||||
dialog->setLabelText(
|
||||
tr("Importing NAND backup\n Time elapsed: %1s")
|
||||
.arg((QDateTime::currentDateTime().toMSecsSinceEpoch() - beginning) / 1000));
|
||||
});
|
||||
});
|
||||
DiscIO::NANDImporter().ImportNANDBin(
|
||||
file.toStdString(),
|
||||
[&dialog, beginning] {
|
||||
QueueOnObject(dialog, [&dialog, beginning] {
|
||||
dialog->setLabelText(
|
||||
tr("Importing NAND backup\n Time elapsed: %1s")
|
||||
.arg((QDateTime::currentDateTime().toMSecsSinceEpoch() - beginning) / 1000));
|
||||
});
|
||||
},
|
||||
[this] {
|
||||
return RunOnObject(this, [this] {
|
||||
return QFileDialog::getOpenFileName(this, tr("Select the OTP/SEEPROM dump"),
|
||||
QDir::currentPath(),
|
||||
tr("BootMii OTP/SEEPROM dump (*.bin);;"
|
||||
"All Files (*)"))
|
||||
.toStdString();
|
||||
});
|
||||
});
|
||||
QueueOnObject(dialog, &QProgressDialog::close);
|
||||
});
|
||||
|
||||
|
Reference in New Issue
Block a user