Merge pull request #1320 from TheKodeToad/better-launch
Combine launch buttons in instance window, persist profiler
This commit is contained in:
@ -968,7 +968,7 @@ void Application::performMainStartupAction()
|
||||
qDebug() << " Launching with account" << m_profileToUse;
|
||||
}
|
||||
|
||||
launch(inst, true, false, nullptr, serverToJoin, accountToUse);
|
||||
launch(inst, true, false, serverToJoin, accountToUse);
|
||||
return;
|
||||
}
|
||||
}
|
||||
@ -1067,7 +1067,7 @@ void Application::messageReceived(const QByteArray& message)
|
||||
}
|
||||
}
|
||||
|
||||
launch(instance, true, false, nullptr, serverObject, accountObject);
|
||||
launch(instance, true, false, serverObject, accountObject);
|
||||
} else {
|
||||
qWarning() << "Received invalid message" << message;
|
||||
}
|
||||
@ -1108,7 +1108,6 @@ bool Application::openJsonEditor(const QString& filename)
|
||||
bool Application::launch(InstancePtr instance,
|
||||
bool online,
|
||||
bool demo,
|
||||
BaseProfilerFactory* profiler,
|
||||
MinecraftServerTargetPtr serverToJoin,
|
||||
MinecraftAccountPtr accountToUse)
|
||||
{
|
||||
@ -1116,7 +1115,7 @@ bool Application::launch(InstancePtr instance,
|
||||
qDebug() << "Cannot launch instances while an update is running. Please try again when updates are completed.";
|
||||
} else if (instance->canLaunch()) {
|
||||
auto& extras = m_instanceExtras[instance->id()];
|
||||
auto& window = extras.window;
|
||||
auto window = extras.window;
|
||||
if (window) {
|
||||
if (!window->saveAll()) {
|
||||
return false;
|
||||
@ -1127,7 +1126,7 @@ bool Application::launch(InstancePtr instance,
|
||||
controller->setInstance(instance);
|
||||
controller->setOnline(online);
|
||||
controller->setDemo(demo);
|
||||
controller->setProfiler(profiler);
|
||||
controller->setProfiler(profilers().value(instance->settings()->get("Profiler").toString(), nullptr).get());
|
||||
controller->setServerToJoin(serverToJoin);
|
||||
controller->setAccountToUse(accountToUse);
|
||||
if (window) {
|
||||
|
Reference in New Issue
Block a user