Fix a few bugs in profilers.

* Legacy was launching before the profiler.
* Some clarity changes.
* Report problem with empty strings as profiler paths.
This commit is contained in:
Petr Mrázek
2014-02-16 00:10:45 +01:00
parent 8219dbf612
commit 7ceb2cacb1
6 changed files with 73 additions and 24 deletions

View File

@ -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);

View File

@ -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());
}

View File

@ -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;