diff options
author | Petr Mrázek <peterix@gmail.com> | 2021-11-10 03:02:51 +0100 |
---|---|---|
committer | Petr Mrázek <peterix@gmail.com> | 2021-11-10 03:02:51 +0100 |
commit | 475d949a1e384d5de16bea5c90fee115460b4b8b (patch) | |
tree | 30501ffd2270e8ebda4ae468dba7dc7efa0942f7 /launcher/minecraft/auth/MinecraftAccount.cpp | |
parent | 32f9c61c6e0e6cdf1eea2817a9b197f44b0415c5 (diff) | |
download | PrismLauncher-475d949a1e384d5de16bea5c90fee115460b4b8b.tar.gz PrismLauncher-475d949a1e384d5de16bea5c90fee115460b4b8b.tar.bz2 PrismLauncher-475d949a1e384d5de16bea5c90fee115460b4b8b.zip |
GH-4217 Add support for GamePass accounts and MC profile setup
- We now use the new endpoint for loggiong in via XBox tokens (/launcher/login)
- We now check game entitlements instead of only relying on MC profile presence
- Accounts can now be added even when they do not have a profile
- The launcher will guide you through selecting a Minecraft name if you don't have one yet
Diffstat (limited to 'launcher/minecraft/auth/MinecraftAccount.cpp')
-rw-r--r-- | launcher/minecraft/auth/MinecraftAccount.cpp | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/launcher/minecraft/auth/MinecraftAccount.cpp b/launcher/minecraft/auth/MinecraftAccount.cpp index 2d76f9ac..8e294443 100644 --- a/launcher/minecraft/auth/MinecraftAccount.cpp +++ b/launcher/minecraft/auth/MinecraftAccount.cpp @@ -213,8 +213,21 @@ void MinecraftAccount::authSucceeded() auto session = m_currentTask->getAssignedSession(); if (session) { - session->status = - session->wants_online ? AuthSession::PlayableOnline : AuthSession::PlayableOffline; + /* + session->status = AuthSession::RequiresProfileSetup; + session->auth_server_online = true; + */ + if(data.profileId().size() == 0) { + session->status = AuthSession::RequiresProfileSetup; + } + else { + if(session->wants_online) { + session->status = AuthSession::PlayableOnline; + } + else { + session->status = AuthSession::PlayableOffline; + } + } fillSession(session); session->auth_server_online = true; } |