mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Avoid creating a fileloader during shutdown.
Some silliness I found while investigating using SuperLuminal.
This commit is contained in:
parent
d1e2b19ebb
commit
6de574104c
2 changed files with 11 additions and 3 deletions
|
@ -677,9 +677,13 @@ void GameInfoCache::Clear() {
|
||||||
|
|
||||||
void GameInfoCache::CancelAll() {
|
void GameInfoCache::CancelAll() {
|
||||||
for (auto info : info_) {
|
for (auto info : info_) {
|
||||||
auto fl = info.second->GetFileLoader();
|
// GetFileLoader will create one if there isn't one already.
|
||||||
if (fl) {
|
// Avoid that by checking.
|
||||||
fl->Cancel();
|
if (info.second->HasFileLoader()) {
|
||||||
|
auto fl = info.second->GetFileLoader();
|
||||||
|
if (fl) {
|
||||||
|
fl->Cancel();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -87,6 +87,10 @@ public:
|
||||||
bool DeleteAllSaveData();
|
bool DeleteAllSaveData();
|
||||||
bool LoadFromPath(const Path &gamePath);
|
bool LoadFromPath(const Path &gamePath);
|
||||||
|
|
||||||
|
bool HasFileLoader() const {
|
||||||
|
return fileLoader.get() != nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
std::shared_ptr<FileLoader> GetFileLoader();
|
std::shared_ptr<FileLoader> GetFileLoader();
|
||||||
void DisposeFileLoader();
|
void DisposeFileLoader();
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue