summaryrefslogtreecommitdiffstats
path: root/logic
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2014-02-16 00:10:45 +0100
committerPetr Mrázek <peterix@gmail.com>2014-02-16 00:10:45 +0100
commit7ceb2cacb129d5924087f616cfc0b949689ed4fe (patch)
tree0bf4136e72a4d6bd56bbaf434fbddced719b01cd /logic
parent8219dbf612f4e6f603d304348fc388e364602f98 (diff)
downloadMultiMC-7ceb2cacb129d5924087f616cfc0b949689ed4fe.tar
MultiMC-7ceb2cacb129d5924087f616cfc0b949689ed4fe.tar.gz
MultiMC-7ceb2cacb129d5924087f616cfc0b949689ed4fe.tar.lz
MultiMC-7ceb2cacb129d5924087f616cfc0b949689ed4fe.tar.xz
MultiMC-7ceb2cacb129d5924087f616cfc0b949689ed4fe.zip
Fix a few bugs in profilers.
* Legacy was launching before the profiler. * Some clarity changes. * Report problem with empty strings as profiler paths.
Diffstat (limited to 'logic')
-rw-r--r--logic/LegacyInstance.cpp2
-rw-r--r--logic/MinecraftProcess.cpp16
-rw-r--r--logic/MinecraftProcess.h12
3 files changed, 27 insertions, 3 deletions
diff --git a/logic/LegacyInstance.cpp b/logic/LegacyInstance.cpp
index a9f0d112..6cd17fea 100644
--- a/logic/LegacyInstance.cpp
+++ b/logic/LegacyInstance.cpp
@@ -77,7 +77,7 @@ MinecraftProcess *LegacyInstance::prepareForLaunch(AuthSessionPtr account)
launchScript += "windowTitle " + windowTitle() + "\n";
launchScript += "windowParams " + windowParams + "\n";
launchScript += "lwjgl " + lwjgl + "\n";
- launchScript += "launch legacy\n";
+ launchScript += "launcher legacy\n";
}
proc->setLaunchScript(launchScript);
diff --git a/logic/MinecraftProcess.cpp b/logic/MinecraftProcess.cpp
index 70a9d55f..89cd71ed 100644
--- a/logic/MinecraftProcess.cpp
+++ b/logic/MinecraftProcess.cpp
@@ -288,7 +288,7 @@ void MinecraftProcess::killMinecraft()
kill();
}
-void MinecraftProcess::launch()
+void MinecraftProcess::arm()
{
emit log("MultiMC version: " + MMC->version().toString() + "\n\n");
emit log("Minecraft folder is:\n" + workingDirectory() + "\n\n");
@@ -374,3 +374,17 @@ void MinecraftProcess::launch()
QByteArray bytes = launchScript.toUtf8();
writeData(bytes.constData(), bytes.length());
}
+
+void MinecraftProcess::launch()
+{
+ QString launchString("launch\n");
+ QByteArray bytes = launchString.toUtf8();
+ writeData(bytes.constData(), bytes.length());
+}
+
+void MinecraftProcess::abort()
+{
+ QString launchString("abort\n");
+ QByteArray bytes = launchString.toUtf8();
+ writeData(bytes.constData(), bytes.length());
+}
diff --git a/logic/MinecraftProcess.h b/logic/MinecraftProcess.h
index 26214026..56340962 100644
--- a/logic/MinecraftProcess.h
+++ b/logic/MinecraftProcess.h
@@ -55,10 +55,20 @@ public:
MinecraftProcess(BaseInstance *inst);
/**
- * @brief launch minecraft
+ * @brief start the launcher part with the provided launch script
+ */
+ void arm();
+
+ /**
+ * @brief launch the armed instance!
*/
void launch();
+ /**
+ * @brief abort launch!
+ */
+ void abort();
+
BaseInstance *instance()
{
return m_instance;