Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request #11284 from AdmiralCurtiss/netplay-save-sync-check…
…-corrupted

Netplay: Check if save is readable before marking it for sync.
  • Loading branch information
AdmiralCurtiss committed Apr 23, 2023
2 parents 8fbfee0 + 00e4fc4 commit 319adaa
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion Source/Core/Core/NetPlayServer.cpp
Expand Up @@ -1721,7 +1721,15 @@ std::optional<SaveSyncInfo> NetPlayServer::CollectSaveSyncInfo()
for (const u64 title : ios.GetES()->GetInstalledTitles())
{
auto save = WiiSave::MakeNandStorage(sync_info.configured_fs.get(), title);
sync_info.wii_saves.emplace_back(title, std::move(save));
if (save && save->ReadHeader().has_value() && save->ReadBkHeader().has_value() &&
save->ReadFiles().has_value())
{
sync_info.wii_saves.emplace_back(title, std::move(save));
}
else
{
INFO_LOG_FMT(NETPLAY, "Skipping Wii save of title {:016x}.", title);
}
}
}
else if (sync_info.game->GetPlatform() == DiscIO::Platform::WiiDisc ||
Expand Down

0 comments on commit 319adaa

Please sign in to comment.