mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-24 09:51:58 +00:00
WiiUtils: Check hashes to determine if a title is installed and up-to-date
Nintendo's official title installation code and ES both only look at content IDs but we should probably check for content hashes in addition to checking for IDs for at least two reasons: 1. Some of the installed contents could be corrupted -- this cannot be easily detected without checking hashes. 2. Some mod distributors do not bother to update content IDs, which means that installing updates from the UI would not actually update the installed game. This is confusing for users. To keep the existing semantic (for IOS especially), the new content hash checks are opt-in for callers of GetStoredContentsFromTMD. This commit changes WiiUtils's WAD installation logic to enable the content hash checks.
This commit is contained in:
parent
2952f99f69
commit
f7d7bbf55f
4 changed files with 38 additions and 6 deletions
|
@ -149,7 +149,8 @@ bool InstallWAD(IOS::HLE::Kernel& ios, const DiscIO::VolumeWAD& wad, InstallType
|
|||
const u64 title_id = wad.GetTMD().GetTitleId();
|
||||
|
||||
// Skip the install if the WAD is already installed.
|
||||
const auto installed_contents = ios.GetES()->GetStoredContentsFromTMD(wad.GetTMD());
|
||||
const auto installed_contents = ios.GetES()->GetStoredContentsFromTMD(
|
||||
wad.GetTMD(), IOS::HLE::Device::ES::CheckContentHashes::Yes);
|
||||
if (wad.GetTMD().GetContents() == installed_contents)
|
||||
{
|
||||
// Clear the "temporary title ID" flag in case the user tries to permanently install a title
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue