mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04: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
1 changed files with 7 additions and 4 deletions
|
@ -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…
Add table
Reference in a new issue