Merge pull request #5585 from JosJuice/volumedirectory-minor-fixes

VolumeDirectory: Minor fixes
This commit is contained in:
Anthony 2017-06-09 11:36:46 -07:00 committed by GitHub
commit 0a69331371
1 changed files with 3 additions and 3 deletions

View File

@ -333,7 +333,7 @@ bool VolumeDirectory::SetApploader(const std::string& apploader)
{
m_apploader.resize(0x20);
// Make sure BS2 HLE doesn't try to run the apploader
*(u32*)&m_apploader[0x10] = (u32)-1;
Write32(static_cast<u32>(-1), 0x10, &m_apploader);
return false;
}
}
@ -372,7 +372,7 @@ void VolumeDirectory::BuildFST()
if (m_fst_address == 0)
m_fst_address = APPLOADER_ADDRESS + 0x2000;
// 4 byte aligned start of data on disk
// 32 KiB aligned start of data on disk
m_data_start_address = Common::AlignUp(m_fst_address + m_fst_data.size(), 0x8000ull);
u64 current_data_address = m_data_start_address;
@ -494,7 +494,7 @@ void VolumeDirectory::WriteDirectory(const File::FSTEntry& parent_entry, u32* fs
_dbg_assert_(DVDINTERFACE, m_virtual_disk.find(*data_offset) == m_virtual_disk.end());
m_virtual_disk.emplace(*data_offset, entry.physicalName);
// 4 byte aligned
// 32 KiB aligned - many games are fine with less alignment, but not all
*data_offset = Common::AlignUp(*data_offset + std::max<u64>(entry.size, 1ull), 0x8000ull);
}
}