From 980e2f67fd8e928940377859dd2c1aa3feb8da8f Mon Sep 17 00:00:00 2001 From: Stenzek Date: Mon, 27 Feb 2023 01:10:13 +1000 Subject: [PATCH] Qt: Don't display updater if running a game or fullscreen --- pcsx2-qt/AutoUpdaterDialog.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/pcsx2-qt/AutoUpdaterDialog.cpp b/pcsx2-qt/AutoUpdaterDialog.cpp index d21ea69c94..95f7e731d8 100644 --- a/pcsx2-qt/AutoUpdaterDialog.cpp +++ b/pcsx2-qt/AutoUpdaterDialog.cpp @@ -495,6 +495,16 @@ void AutoUpdaterDialog::checkIfUpdateNeeded() Console.WriteLn(Color_StrongRed, "Update needed."); + // Don't show the dialog if a game started while the update info was downloading. Some people have + // really slow connections, apparently. If we're a manual triggered update check, then display + // regardless. This will fall through and signal main to delete us. + if (!m_display_messages && + (QtHost::IsVMValid() || (g_emu_thread->isRunningFullscreenUI() && g_emu_thread->isFullscreen()))) + { + Console.WriteLn(Color_StrongRed, "Not showing update dialog due to active VM."); + return; + } + m_ui.currentVersion->setText(tr("Current Version: %1 (%2)").arg(getCurrentVersion()).arg(getCurrentVersionDate())); m_ui.newVersion->setText(tr("New Version: %1 (%2)").arg(m_latest_version).arg(m_latest_version_timestamp.toString())); m_ui.updateNotes->setText(tr("Loading..."));