Improve NAND import progress dialog

Now with cancel button and an actual progress bar. For simplicity, we do
two passes on the progress bar, one for loading the NAND into memory and
one for extracting it. The user directory is likely on an SSD, making
the extraction pass invisibly fast.
This commit is contained in:
Tillmann Karras
2026-04-03 23:50:59 +01:00
parent 2b6ca92146
commit f06aef4f83
4 changed files with 56 additions and 28 deletions

View File

@@ -102,10 +102,10 @@ JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_utils_WiiUtils_importNANDB
return DiscIO::NANDImporter().ImportNANDBin(
path,
[] {
// This callback gets called every now and then in case we want to update the GUI. However,
// we have no way of knowing what the current progress is, so we can't do anything
// especially useful. DolphinQt chooses to show the elapsed time, for reference.
[](DiscIO::NANDImporter::Step, int, int) {
// This callback gets called every now and then in case we want to update the GUI.
// TODO
return false;
},
[] {
// This callback gets called if the NAND file does not have decryption keys appended to it.