diff options
author | Petr Mrázek <peterix@gmail.com> | 2015-10-18 02:35:47 +0200 |
---|---|---|
committer | Petr Mrázek <peterix@gmail.com> | 2015-10-18 02:35:47 +0200 |
commit | 7ef1f88de773c22e4e78c9bfb900b2674d9adb2c (patch) | |
tree | e567a6f19d18a2dd01d53323eedaf6584627e254 /logic/launch/steps/LaunchMinecraft.cpp | |
parent | 432e812da188f96ad7038772171944a49225371d (diff) | |
download | MultiMC-7ef1f88de773c22e4e78c9bfb900b2674d9adb2c.tar MultiMC-7ef1f88de773c22e4e78c9bfb900b2674d9adb2c.tar.gz MultiMC-7ef1f88de773c22e4e78c9bfb900b2674d9adb2c.tar.lz MultiMC-7ef1f88de773c22e4e78c9bfb900b2674d9adb2c.tar.xz MultiMC-7ef1f88de773c22e4e78c9bfb900b2674d9adb2c.zip |
NOISSUE fix non-zero exit code from minecraft not being a 'crash'
Diffstat (limited to 'logic/launch/steps/LaunchMinecraft.cpp')
-rw-r--r-- | logic/launch/steps/LaunchMinecraft.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/logic/launch/steps/LaunchMinecraft.cpp b/logic/launch/steps/LaunchMinecraft.cpp index 0cbf5f3a..05b1d948 100644 --- a/logic/launch/steps/LaunchMinecraft.cpp +++ b/logic/launch/steps/LaunchMinecraft.cpp @@ -88,8 +88,14 @@ void LaunchMinecraft::on_state(LoggedProcess::State state) case LoggedProcess::Finished: { m_parent->setPid(-1); + // if the exit code wasn't 0, report this as a crash + auto exitCode = m_process.exitCode(); + if(exitCode != 0) + { + emitFailed("Game crashed."); + return; + } //FIXME: make this work again - // auto exitCode = m_process.exitCode(); // m_postlaunchprocess.processEnvironment().insert("INST_EXITCODE", QString(exitCode)); // run post-exit emitSucceeded(); |