mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-11 05:26:24 +02:00
UI: Delay game config/discord until game info load.
This avoids a race condition where the info is not always available, causing game-specific config and Discord presence to set incorrectly.
This commit is contained in:
1 parent
ec5b0c21a8
commit
3fc845a265
2 files changed
+13
-5
No files matched your search
@@ -353,8 +353,10 @@ public:
|
||||
}
|
||||
|
||||
void run() override {
|
||||
if (!info_->LoadFromPath(gamePath_))
|
||||
if (!info_->LoadFromPath(gamePath_)) {
|
||||
info_->pending = false;
|
||||
return;
|
||||
}
|
||||
// In case of a remote file, check if it actually exists before locking.
|
||||
if (!info_->GetFileLoader()->Exists()) {
|
||||
info_->pending = false;
|
||||
@@ -381,6 +383,7 @@ public:
|
||||
goto handleELF;
|
||||
}
|
||||
ERROR_LOG(LOADER, "invalid pbp %s\n", pbpLoader->Path().c_str());
|
||||
info_->pending = false;
|
||||
info_->working = false;
|
||||
return;
|
||||
}
|
||||
@@ -549,11 +552,13 @@ handleELF:
|
||||
// few files.
|
||||
auto fl = info_->GetFileLoader();
|
||||
if (!fl) {
|
||||
info_->pending = false;
|
||||
info_->working = false;
|
||||
return; // Happens with UWP currently, TODO...
|
||||
}
|
||||
BlockDevice *bd = constructBlockDevice(info_->GetFileLoader().get());
|
||||
if (!bd) {
|
||||
info_->pending = false;
|
||||
info_->working = false;
|
||||
return; // nothing to do here..
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user