diff --git a/UI/EmuScreen.cpp b/UI/EmuScreen.cpp index 2c5f498658..5e67c10509 100644 --- a/UI/EmuScreen.cpp +++ b/UI/EmuScreen.cpp @@ -1224,6 +1224,11 @@ void EmuScreen::update() { return; } + if (pauseTrigger_) { + pauseTrigger_ = false; + screenManager()->push(new GamePauseScreen(gamePath_)); + } + if (invalid_) return; @@ -1231,11 +1236,6 @@ void EmuScreen::update() { controlMapper_.Update(now); - if (pauseTrigger_) { - pauseTrigger_ = false; - screenManager()->push(new GamePauseScreen(gamePath_)); - } - if (saveStatePreview_ && !bootPending_) { int currentSlot = SaveState::GetCurrentSlot(); if (saveStateSlot_ != currentSlot) { @@ -1297,6 +1297,11 @@ ScreenRenderRole EmuScreen::renderRole(bool isTop) const { return true; return false; } + + if (invalid_) { + return false; + } + return true; }; diff --git a/UI/GameInfoCache.cpp b/UI/GameInfoCache.cpp index 00b4e13cdd..6f9460ce82 100644 --- a/UI/GameInfoCache.cpp +++ b/UI/GameInfoCache.cpp @@ -522,6 +522,10 @@ public: goto handleELF; } ERROR_LOG(Log::Loader, "invalid pbp '%s'\n", pbpLoader->GetPath().c_str()); + // We can't win here - just mark everything pending as fetched, and let the caller + // handle the missing data. + std::unique_lock lock(info_->lock); + info_->MarkReadyNoLock(flags_); return; } @@ -720,10 +724,17 @@ handleELF: // few files. auto fl = info_->GetFileLoader(); if (!fl) { + // BAD! Can't win here. + ERROR_LOG(Log::Loader, "Failed getting game info for ISO %s", info_->GetFilePath().ToVisualString().c_str()); + std::unique_lock lock(info_->lock); + info_->MarkReadyNoLock(flags_); return; } BlockDevice *bd = constructBlockDevice(info_->GetFileLoader().get()); if (!bd) { + ERROR_LOG(Log::Loader, "Failed constructing block device for ISO %s", info_->GetFilePath().ToVisualString().c_str()); + std::unique_lock lock(info_->lock); + info_->MarkReadyNoLock(flags_); return; } ISOFileSystem umd(&handles, bd);