GameList: Add "File Size" field

This commit is contained in:
Stenzek
2023-12-20 23:40:24 +10:00
parent fd341f6a9d
commit 36643fe78b
15 changed files with 128 additions and 26 deletions

View File

@ -68,6 +68,7 @@ public:
bool HasNonStandardSubchannel() const override;
PrecacheResult Precache(ProgressCallback* progress) override;
bool IsPrecached() const override;
s64 GetSizeOnDisk() const override;
protected:
bool ReadSectorFromIndex(void* buffer, const Index& index, LBA lba_in_index) override;
@ -571,6 +572,11 @@ ALWAYS_INLINE_RELEASE bool CDImageCHD::UpdateHunkBuffer(const Index& index, LBA
return true;
}
s64 CDImageCHD::GetSizeOnDisk() const
{
return static_cast<s64>(chd_get_compressed_size(m_chd));
}
std::unique_ptr<CDImage> CDImage::OpenCHDImage(const char* filename, Error* error)
{
std::unique_ptr<CDImageCHD> image = std::make_unique<CDImageCHD>();