aboutsummaryrefslogtreecommitdiff
path: root/launcher/LaunchController.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'launcher/LaunchController.cpp')
-rw-r--r--launcher/LaunchController.cpp14
1 files changed, 13 insertions, 1 deletions
diff --git a/launcher/LaunchController.cpp b/launcher/LaunchController.cpp
index 11e3de15..5dd551ee 100644
--- a/launcher/LaunchController.cpp
+++ b/launcher/LaunchController.cpp
@@ -112,7 +112,19 @@ void LaunchController::decideAccount()
}
}
- m_accountToUse = accounts->defaultAccount();
+ // Select the account to use. If the instance has a specific account set, that will be used. Otherwise, the default account will be used
+ auto instanceAccountId = m_instance->settings()->get("InstanceAccountId").toString();
+ auto instanceAccountIndex = accounts->findAccountByProfileId(instanceAccountId);
+ if (instanceAccountIndex == -1)
+ {
+ m_accountToUse = accounts->defaultAccount();
+ }
+ else
+ {
+ m_accountToUse = accounts->at(instanceAccountIndex);
+ }
+
+
if (!m_accountToUse)
{
// If no default account is set, ask the user which one to use.