1
Fork 0
mirror of https://github.com/redstrate/Astra.git synced 2025-04-21 20:27:45 +00:00

Fix ordering of patch events in registerSession

This commit is contained in:
Joshua Goins 2024-11-09 14:17:36 -05:00
parent fe60a48d7f
commit 1f54ea2e8d

View file

@ -385,12 +385,14 @@ QCoro::Task<bool> SquareEnixLogin::registerSession()
m_patcher = new Patcher(m_launcher, m_info->profile->gamePath() + QStringLiteral("/game"), *m_info->profile->gameData(), this); m_patcher = new Patcher(m_launcher, m_info->profile->gamePath() + QStringLiteral("/game"), *m_info->profile->gameData(), this);
std::string bodyStd = body.toStdString(); std::string bodyStd = body.toStdString();
const bool hasPatched = co_await m_patcher->patch(physis_parse_patchlist(PatchListType::Game, bodyStd.c_str())); const bool hasPatched = co_await m_patcher->patch(physis_parse_patchlist(PatchListType::Game, bodyStd.c_str()));
if (hasPatched) { m_patcher->deleteLater();
if (!hasPatched) {
co_return false;
}
// re-read game version if it has updated // re-read game version if it has updated
m_info->profile->readGameVersion(); m_info->profile->readGameVersion();
} }
m_patcher->deleteLater();
}
m_auth.SID = patchUniqueId; m_auth.SID = patchUniqueId;