mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-29 09:13:39 +01: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:
1 parent
2d0bc5eeee
commit
4fa529db50
1 file changed
+7
-4
@@ -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() {
|
||||
|
||||
Reference in new issue
Block a user