diff --git a/src/settingswindow.cpp b/src/settingswindow.cpp index 462fca9..e2b1659 100644 --- a/src/settingswindow.cpp +++ b/src/settingswindow.cpp @@ -70,8 +70,7 @@ SettingsWindow::SettingsWindow(LauncherWindow& window, QWidget* parent) : window this->reloadControls(); this->window.saveSettings(); - // TODO: replace this call with a dedicated "read version information" call or something similar - //this->window.readInitialInformation(); + this->window.readGameVersion(); }); gameBoxLayout->addWidget(selectDirectoryButton); diff --git a/src/xivlauncher.cpp b/src/xivlauncher.cpp index f066af1..2874be1 100755 --- a/src/xivlauncher.cpp +++ b/src/xivlauncher.cpp @@ -184,9 +184,6 @@ void LauncherWindow::readInitialInformation() { #endif } - profile.bootVersion = readVersion(profile.gamePath + "/boot/ffxivboot.ver"); - profile.gameVersion = readVersion(profile.gamePath + "/game/ffxivgame.ver"); - profile.isSapphire = settings.value("isSapphire", false).toBool(); profile.lobbyURL = settings.value("lobbyURL", "").toString(); profile.rememberUsername = settings.value("rememberUsername", false).toBool(); @@ -202,6 +199,15 @@ void LauncherWindow::readInitialInformation() { profileSettings.append(profile); } + + readGameVersion(); +} + +void LauncherWindow::readGameVersion() { + for(auto& profile : profileSettings) { + profile.bootVersion = readVersion(profile.gamePath + "/boot/ffxivboot.ver"); + profile.gameVersion = readVersion(profile.gamePath + "/game/ffxivgame.ver"); + } } LauncherWindow::LauncherWindow(QWidget* parent) : diff --git a/src/xivlauncher.h b/src/xivlauncher.h index 005db16..68c3ace 100755 --- a/src/xivlauncher.h +++ b/src/xivlauncher.h @@ -70,6 +70,7 @@ public: void setSSL(QNetworkRequest& request); QString readVersion(QString path); void readInitialInformation(); + void readGameVersion(); void saveSettings(); QSettings settings;