diff --git a/src/core/cdrom.cpp b/src/core/cdrom.cpp
index 30df04ffa..14ee6fc8c 100644
--- a/src/core/cdrom.cpp
+++ b/src/core/cdrom.cpp
@@ -3292,6 +3292,7 @@ void CDROM::CreateFileMap()
}
Log_DevFmt("Creating file map for {}...", media->GetFileName());
+ s_file_map.emplace(iso.GetPVDLBA(), std::make_pair(iso.GetPVDLBA(), std::string("PVD")));
CreateFileMap(iso, std::string_view());
Log_DevFmt("Found {} files", s_file_map.size());
}
@@ -3302,6 +3303,10 @@ void CDROM::CreateFileMap(IsoReader& iso, const std::string_view& dir)
{
if (entry.IsDirectory())
{
+ Log_DevFmt("{}-{} = {}", entry.location_le, entry.location_le + entry.GetSizeInSectors() - 1, path);
+ s_file_map.emplace(entry.location_le, std::make_pair(entry.location_le + entry.GetSizeInSectors() - 1,
+ fmt::format("
{}", path)));
+
CreateFileMap(iso, path);
continue;
}
diff --git a/src/util/iso_reader.cpp b/src/util/iso_reader.cpp
index fecfc6c86..7c0eda909 100644
--- a/src/util/iso_reader.cpp
+++ b/src/util/iso_reader.cpp
@@ -72,6 +72,7 @@ bool IsoReader::ReadPVD(Error* error)
else if (header->type_code == 255)
break;
+ m_pvd_lba = START_SECTOR + i;
std::memcpy(&m_pvd, buffer, sizeof(ISOPrimaryVolumeDescriptor));
Log_DevFmt("ISOReader: PVD found at index {}", i);
return true;
diff --git a/src/util/iso_reader.h b/src/util/iso_reader.h
index c38dda110..a3bba1af4 100644
--- a/src/util/iso_reader.h
+++ b/src/util/iso_reader.h
@@ -145,6 +145,7 @@ public:
ALWAYS_INLINE const CDImage* GetImage() const { return m_image; }
ALWAYS_INLINE u32 GetTrackNumber() const { return m_track_number; }
+ ALWAYS_INLINE u32 GetPVDLBA() const { return m_pvd_lba; }
ALWAYS_INLINE const ISOPrimaryVolumeDescriptor& GetPVD() const { return m_pvd; }
bool Open(CDImage* image, u32 track_number, Error* error = nullptr);
@@ -173,4 +174,5 @@ private:
u32 m_track_number;
ISOPrimaryVolumeDescriptor m_pvd = {};
+ u32 m_pvd_lba = 0;
};