From 40570c321069b832722b807227fd8ff9bbd7c10d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Mr=C3=A1zek?= Date: Sun, 24 Mar 2013 15:36:00 +0100 Subject: Fix settings objects, instances can be started from the GUI now --- libmultimc/src/instance.cpp | 6 ++++++ libmultimc/src/minecraftprocess.cpp | 7 ++++--- 2 files changed, 10 insertions(+), 3 deletions(-) (limited to 'libmultimc/src') diff --git a/libmultimc/src/instance.cpp b/libmultimc/src/instance.cpp index 1af359d1..f9e105c7 100644 --- a/libmultimc/src/instance.cpp +++ b/libmultimc/src/instance.cpp @@ -48,6 +48,12 @@ Instance::Instance(const QString &rootDir, QObject *parent) : settings().registerSetting(new OverrideSetting("PostExitCommand", globalSettings->getSetting("PostExitCommand"))); + // Window Size + settings().registerSetting(new OverrideSetting("LaunchCompatMode", globalSettings->getSetting("LaunchCompatMode"))); + settings().registerSetting(new OverrideSetting("LaunchMaximized", globalSettings->getSetting("LaunchMaximized"))); + settings().registerSetting(new OverrideSetting("MinecraftWinWidth", globalSettings->getSetting("MinecraftWinWidth"))); + settings().registerSetting(new OverrideSetting("MinecraftWinHeight", globalSettings->getSetting("MinecraftWinHeight"))); + // Memory settings().registerSetting(new OverrideSetting("MinMemAlloc", globalSettings->getSetting("MinMemAlloc"))); settings().registerSetting(new OverrideSetting("MaxMemAlloc", globalSettings->getSetting("MaxMemAlloc"))); diff --git a/libmultimc/src/minecraftprocess.cpp b/libmultimc/src/minecraftprocess.cpp index e22a536c..1239bc3a 100644 --- a/libmultimc/src/minecraftprocess.cpp +++ b/libmultimc/src/minecraftprocess.cpp @@ -182,9 +182,10 @@ void MinecraftProcess::launch() genArgs(); emit log(QString("Minecraft folder is: '%1'").arg(workingDirectory())); - emit log(QString("Instance launched with arguments: '%1'").arg(m_arguments.join("' '"))); - - start(m_instance->settings().get("JavaPath").toString(), m_arguments); + QString JavaPath = m_instance->settings().get("JavaPath").toString(); + emit log(QString("Java path: '%1'").arg(JavaPath)); + emit log(QString("Arguments: '%1'").arg(m_arguments.join("' '"))); + start(JavaPath, m_arguments); if (!waitForStarted()) { emit log("Could not launch minecraft!"); -- cgit v1.2.3