WiiUtils: Attempt to fix the NAND more aggressively

Change the repair logic to fix issues more aggressively by deleting bad
titles. This is necessary because of a bug in Dolphin's WAD boot code.

The UI code was updated to inform the user about titles that will be
deleted if they continue a repair, before deleting anything.
This commit is contained in:
Léo Lam 2017-10-06 21:45:28 +02:00
parent e1c0b8d011
commit 02e17594b0
4 changed files with 83 additions and 29 deletions

View file

@ -7,6 +7,7 @@
#include <cstddef>
#include <functional>
#include <string>
#include <unordered_set>
#include "Common/CommonTypes.h"
@ -58,6 +59,11 @@ UpdateResult DoOnlineUpdate(UpdateCallback update_callback, const std::string& r
UpdateResult DoDiscUpdate(UpdateCallback update_callback, const std::string& image_path);
// Check the emulated NAND for common issues.
bool CheckNAND(IOS::HLE::Kernel& ios);
struct NANDCheckResult
{
bool bad = false;
std::unordered_set<u64> titles_to_remove;
};
NANDCheckResult CheckNAND(IOS::HLE::Kernel& ios);
bool RepairNAND(IOS::HLE::Kernel& ios);
}