mirror of
https://github.com/redstrate/Astra.git
synced 2025-04-22 04:37:46 +00:00
Reread game version once profile game directory changed
This commit is contained in:
parent
dfb4afb12e
commit
e1d4be7aff
3 changed files with 11 additions and 5 deletions
|
@ -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);
|
||||
|
||||
|
|
|
@ -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) :
|
||||
|
|
|
@ -70,6 +70,7 @@ public:
|
|||
void setSSL(QNetworkRequest& request);
|
||||
QString readVersion(QString path);
|
||||
void readInitialInformation();
|
||||
void readGameVersion();
|
||||
void saveSettings();
|
||||
|
||||
QSettings settings;
|
||||
|
|
Loading…
Add table
Reference in a new issue