aboutsummaryrefslogtreecommitdiff
path: root/launcher/minecraft/launch
diff options
context:
space:
mode:
authorflow <flowlnlnln@gmail.com>2022-05-15 17:40:53 -0300
committerGitHub <noreply@github.com>2022-05-15 17:40:53 -0300
commita67f3131e7585615d7d759963bfc7676d2728e67 (patch)
tree75a754df541a58360d74ea3a31a7dccff9a2a78d /launcher/minecraft/launch
parente5d00971167d46e6ac5111798d4dc53a52735676 (diff)
parent3aea639fe4359259a27e971ae357e308ae50e69d (diff)
downloadPrismLauncher-a67f3131e7585615d7d759963bfc7676d2728e67.tar.gz
PrismLauncher-a67f3131e7585615d7d759963bfc7676d2728e67.tar.bz2
PrismLauncher-a67f3131e7585615d7d759963bfc7676d2728e67.zip
Merge pull request #560 from kthchew/feature/close-pmc-override
Add instance overrides for miscellaneous settings
Diffstat (limited to 'launcher/minecraft/launch')
-rw-r--r--launcher/minecraft/launch/LauncherPartLaunch.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/launcher/minecraft/launch/LauncherPartLaunch.cpp b/launcher/minecraft/launch/LauncherPartLaunch.cpp
index 173f29b5..d7010355 100644
--- a/launcher/minecraft/launch/LauncherPartLaunch.cpp
+++ b/launcher/minecraft/launch/LauncherPartLaunch.cpp
@@ -25,7 +25,8 @@
LauncherPartLaunch::LauncherPartLaunch(LaunchTask *parent) : LaunchStep(parent)
{
- if (APPLICATION->settings()->get("CloseAfterLaunch").toBool())
+ auto instance = parent->instance();
+ if (instance->settings()->get("CloseAfterLaunch").toBool())
{
std::shared_ptr<QMetaObject::Connection> connection{new QMetaObject::Connection};
*connection = connect(&m_process, &LoggedProcess::log, this, [=](QStringList lines, MessageLevel::Enum level) {
@@ -168,7 +169,8 @@ void LauncherPartLaunch::on_state(LoggedProcess::State state)
}
case LoggedProcess::Finished:
{
- if (APPLICATION->settings()->get("CloseAfterLaunch").toBool())
+ auto instance = m_parent->instance();
+ if (instance->settings()->get("CloseAfterLaunch").toBool())
APPLICATION->showMainWindow();
m_parent->setPid(-1);