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

@ -170,6 +170,7 @@ public:
bool ReadSubChannelQ(SubChannelQ* subq, const Index& index, LBA lba_in_index) override;
bool HasNonStandardSubchannel() const override;
s64 GetSizeOnDisk() const override;
protected:
bool ReadSectorFromIndex(void* buffer, const Index& index, LBA lba_in_index) override;
@ -542,6 +543,11 @@ bool CDImageEcm::ReadSectorFromIndex(void* buffer, const Index& index, LBA lba_i
return true;
}
s64 CDImageEcm::GetSizeOnDisk() const
{
return FileSystem::FSize64(m_fp);
}
std::unique_ptr<CDImage> CDImage::OpenEcmImage(const char* filename, Error* error)
{
std::unique_ptr<CDImageEcm> image = std::make_unique<CDImageEcm>();