Trophy: Return correct disk space requirements

Closes #3763
This commit is contained in:
VelocityRa 2017-11-20 15:08:35 +02:00 committed by Nekotekina
parent d40aaf0391
commit 489ded43b1
3 changed files with 21 additions and 6 deletions

View file

@ -103,6 +103,14 @@ bool TRPLoader::LoadHeader(bool show)
return true;
}
u64 TRPLoader::GetRequiredSpace() const
{
const u64 file_size = m_header.trp_file_size;
const u64 file_element_size = u64{1} * m_header.trp_files_count * m_header.trp_element_size;
return file_size - sizeof(m_header) - file_element_size;
}
bool TRPLoader::ContainsEntry(const char *filename)
{
for (const TRPEntry& entry : m_entries)