Filesystem: Use file info in arguments instead of path

Some callers already have the file info, making the relatively slow
FindFileInfo calls unnecessary. Callers that didn't have the file info
will now need to call FindFileInfo on their own.
This commit is contained in:
JosJuice 2015-07-30 15:06:23 +02:00
commit 7c45afecb2
7 changed files with 53 additions and 39 deletions

View file

@ -274,7 +274,8 @@ std::map<Language, std::string> VolumeWii::GetLongNames() const
return {};
std::vector<u8> opening_bnr(NAMES_TOTAL_BYTES);
size_t size = file_system->ReadFile("opening.bnr", opening_bnr.data(), opening_bnr.size(), 0x5C);
const FileInfo* file_info = file_system->FindFileInfo("opening.bnr");
size_t size = file_system->ReadFile(file_info, opening_bnr.data(), opening_bnr.size(), 0x5C);
opening_bnr.resize(size);
return ReadWiiNames(opening_bnr);
}