Merge pull request #7966 from Techjar/fix-netplay-full-wii-save

Core/WiiRoot: Fix NetPlay full Wii save sync not copying all the saves back to main NAND
This commit is contained in:
Léo Lam 2019-05-01 19:29:38 +02:00 committed by GitHub
commit 98b670dd29
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 21 additions and 20 deletions

View File

@ -252,8 +252,8 @@ void CleanUpWiiFileSystemContents()
WARN_LOG(CORE, "Failed to copy Mii database to the NAND"); WARN_LOG(CORE, "Failed to copy Mii database to the NAND");
} }
const u64 title_id = SConfig::GetInstance().GetTitleID(); for (const u64 title_id : ios->GetES()->GetInstalledTitles())
{
const auto session_save = WiiSave::MakeNandStorage(ios->GetFS().get(), title_id); const auto session_save = WiiSave::MakeNandStorage(ios->GetFS().get(), title_id);
// FS won't write the save if the directory doesn't exist // FS won't write the save if the directory doesn't exist
@ -274,5 +274,6 @@ void CleanUpWiiFileSystemContents()
// Backup the existing save just in case it's still needed. // Backup the existing save just in case it's still needed.
WiiSave::Copy(user_save.get(), backup_save.get()); WiiSave::Copy(user_save.get(), backup_save.get());
WiiSave::Copy(session_save.get(), user_save.get()); WiiSave::Copy(session_save.get(), user_save.get());
}
} }
} // namespace Core } // namespace Core