From 7ef1f88de773c22e4e78c9bfb900b2674d9adb2c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Mr=C3=A1zek?= Date: Sun, 18 Oct 2015 02:35:47 +0200 Subject: NOISSUE fix non-zero exit code from minecraft not being a 'crash' --- logic/launch/steps/LaunchMinecraft.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'logic/launch/steps/LaunchMinecraft.cpp') 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(); -- cgit v1.2.3