1
Fork 0
mirror of https://github.com/redstrate/Astra.git synced 2025-04-23 12:57:45 +00:00

Remove LauncherCore::launchGame

This is only used internally now, so we can remove it from public API
This commit is contained in:
Joshua Goins 2023-10-11 14:35:10 -04:00
parent 7ad09f6fcf
commit ca4d47349b
3 changed files with 8 additions and 18 deletions

View file

@ -95,11 +95,6 @@ public:
*/
Q_INVOKABLE bool autoLogin(Profile *profile);
/*
* Launches the game using the provided authentication.
*/
void launchGame(Profile &settings, const LoginAuth &auth);
void buildRequest(const Profile &settings, QNetworkRequest &request);
void setSSL(QNetworkRequest &request);
void setupIgnoreSSL(QNetworkReply *reply);

View file

@ -57,17 +57,6 @@ void LauncherCore::buildRequest(const Profile &settings, QNetworkRequest &reques
request.setRawHeader(QByteArrayLiteral("Accept-Language"), QByteArrayLiteral("en-us"));
}
void LauncherCore::launchGame(Profile &profile, const LoginAuth &auth)
{
Q_EMIT stageChanged(i18n("Launching game..."));
if (isSteam()) {
m_steamApi->setLauncherMode(false);
}
m_runner->beginGameExecutable(profile, auth);
}
QCoro::Task<> LauncherCore::beginLogin(LoginInformation &info)
{
info.profile->account()->updateConfig();
@ -82,7 +71,13 @@ QCoro::Task<> LauncherCore::beginLogin(LoginInformation &info)
}
if (auth != std::nullopt) {
launchGame(*info.profile, *auth);
Q_EMIT stageChanged(i18n("Launching game..."));
if (isSteam()) {
m_steamApi->setLauncherMode(false);
}
m_runner->beginGameExecutable(*info.profile, *auth);
}
}

View file

@ -69,6 +69,6 @@ void SapphireLogin::registerAccount(const QString &lobbyUrl, const LoginInformat
auth.frontierHost = document[QLatin1String("frontierHost")].toString();
auth.region = 3;
m_launcher.launchGame(*info.profile, auth);
// m_launcher.launchGame(*info.profile, auth);
});
}