From 9c7174c81f3c518a63ee4d7068c946b1e52f39b3 Mon Sep 17 00:00:00 2001 From: Joshua Goins Date: Mon, 5 May 2025 15:43:40 -0400 Subject: [PATCH] Fallback to the base game version when no version file is found --- launcher/src/profile.cpp | 3 +++ launcher/ui/Pages/StatusPage.qml | 7 +++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/launcher/src/profile.cpp b/launcher/src/profile.cpp index 6ad8ff6..297e5a2 100644 --- a/launcher/src/profile.cpp +++ b/launcher/src/profile.cpp @@ -288,6 +288,9 @@ QString Profile::bootVersion() const QString Profile::baseGameVersion() const { Q_ASSERT(m_repositories.repositories_count >= 1); + if (m_repositories.repositories_count == 0 || m_repositories.repositories[0].version == nullptr) { + return QStringLiteral("2012.01.01.0000.0000"); + } return QString::fromLatin1(m_repositories.repositories[0].version); } diff --git a/launcher/ui/Pages/StatusPage.qml b/launcher/ui/Pages/StatusPage.qml index b1e8b90..56efedc 100644 --- a/launcher/ui/Pages/StatusPage.qml +++ b/launcher/ui/Pages/StatusPage.qml @@ -56,13 +56,16 @@ Kirigami.Page { } Kirigami.PromptDialog { - id: updateRequiredDialog + id: updateDialog showCloseButton: false standardButtons: Kirigami.Dialog.Yes | Kirigami.Dialog.Cancel onAccepted: LauncherCore.updateDecided(true) - onRejected: LauncherCore.updateDecided(false) + onRejected: { + LauncherCore.updateDecided(false); + applicationWindow().checkSetup(); + } } Connections {