mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 06:09:50 -06:00
Filesystem: Replace GetFileList()
Instead of expecting callers to know how the size of directory file infos relates to which files are in which directories, filesystems now offer a GetRoot() method, and file infos offer a way to get their children. As a bonus, m_FileInfoVector no longer has to be created and kept around in RAM. Only the file info objects that actually are used are created.
This commit is contained in:
@ -177,7 +177,7 @@ void VolumeGC::LoadBannerFile() const
|
||||
if (!file_system)
|
||||
return;
|
||||
|
||||
const FileInfo* file_info = file_system->FindFileInfo("opening.bnr");
|
||||
std::unique_ptr<FileInfo> file_info = file_system->FindFileInfo("opening.bnr");
|
||||
if (!file_info)
|
||||
return;
|
||||
|
||||
@ -190,7 +190,8 @@ void VolumeGC::LoadBannerFile() const
|
||||
return;
|
||||
}
|
||||
|
||||
if (file_size != file_system->ReadFile(file_info, reinterpret_cast<u8*>(&banner_file), file_size))
|
||||
if (file_size !=
|
||||
file_system->ReadFile(file_info.get(), reinterpret_cast<u8*>(&banner_file), file_size))
|
||||
{
|
||||
WARN_LOG(DISCIO, "Could not read opening.bnr.");
|
||||
return;
|
||||
|
Reference in New Issue
Block a user