1
Fork 0
mirror of https://github.com/redstrate/Astra.git synced 2025-05-11 20:47:45 +00:00

Fallback to the base game version when no version file is found

This commit is contained in:
Joshua Goins 2025-05-05 15:43:40 -04:00
parent 6f499927be
commit 9c7174c81f
2 changed files with 8 additions and 2 deletions

View file

@ -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);
}

View file

@ -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 {