mirror of
https://github.com/libretro/ppsspp.git
synced 2024-12-04 23:16:41 +00:00
Potentially reuse a cached file loader.
Although right now we always dispose, this just makes it so we could more easily garbage collect them if we wanted.
This commit is contained in:
parent
2d0bc5eeee
commit
4fa529db50
@ -166,11 +166,14 @@ u64 GameInfo::GetInstallDataSizeInBytes() {
|
||||
}
|
||||
|
||||
bool GameInfo::LoadFromPath(const std::string &gamePath) {
|
||||
delete fileLoader;
|
||||
fileLoader = ConstructFileLoader(gamePath);
|
||||
filePath_ = gamePath;
|
||||
// No need to rebuild if we already have it loaded.
|
||||
if (filePath_ != gamePath) {
|
||||
delete fileLoader;
|
||||
fileLoader = ConstructFileLoader(gamePath);
|
||||
filePath_ = gamePath;
|
||||
}
|
||||
|
||||
return fileLoader->Exists();
|
||||
return GetFileLoader()->Exists();
|
||||
}
|
||||
|
||||
FileLoader *GameInfo::GetFileLoader() {
|
||||
|
Loading…
Reference in New Issue
Block a user