From b8893ee0b0ad64b43d0ae55c69929e7a72179217 Mon Sep 17 00:00:00 2001 From: redstrate Date: Tue, 2 Nov 2021 08:27:00 -0400 Subject: [PATCH] Reread version info if game path changed --- src/settingswindow.cpp | 4 ++++ src/xivlauncher.h | 3 +-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/settingswindow.cpp b/src/settingswindow.cpp index 96eabb0..29ae36b 100644 --- a/src/settingswindow.cpp +++ b/src/settingswindow.cpp @@ -7,6 +7,8 @@ #include #include #include +#include +#include #include "xivlauncher.h" @@ -75,6 +77,8 @@ SettingsWindow::SettingsWindow(LauncherWindow& window, QWidget* parent) : window connect(selectDirectoryButton, &QPushButton::pressed, [this, currentGameDirectory] { this->window.gamePath = QFileDialog::getExistingDirectory(this, "Open Game Directory"); currentGameDirectory->setText(this->window.gamePath); + + this->window.readInitialInformation(); }); layout->addWidget(selectDirectoryButton); diff --git a/src/xivlauncher.h b/src/xivlauncher.h index d4fae46..8a3add2 100755 --- a/src/xivlauncher.h +++ b/src/xivlauncher.h @@ -41,12 +41,11 @@ public: void buildRequest(QNetworkRequest& request); void setSSL(QNetworkRequest& request); QString readVersion(QString path); + void readInitialInformation(); QSettings settings; private: - void readInitialInformation(); - SapphireLauncher* sapphireLauncher; SquareBoot* squareBoot; SquareLauncher* squareLauncher;