aboutsummaryrefslogtreecommitdiff
path: root/launcher/LaunchController.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'launcher/LaunchController.cpp')
-rw-r--r--launcher/LaunchController.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/launcher/LaunchController.cpp b/launcher/LaunchController.cpp
index 11e3de15..9741fd95 100644
--- a/launcher/LaunchController.cpp
+++ b/launcher/LaunchController.cpp
@@ -112,7 +112,15 @@ 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.