# HG changeset patch # User Wuzzy # Date 1531851221 -7200 # Node ID d9f9e66543d744bd30f24c49b618a107b705ed4f # Parent c41b16ac2e0562da749eccd3f64530515572ba00 Fix frontend showing 2 errors on engine fatal error (exit code 52) The exit code checked in the frontend was a hardcoded 2, which was outdated. diff -r c41b16ac2e05 -r d9f9e66543d7 QTfrontend/hwconsts.h --- a/QTfrontend/hwconsts.h Tue Jul 17 19:44:29 2018 +0200 +++ b/QTfrontend/hwconsts.h Tue Jul 17 20:13:41 2018 +0200 @@ -74,6 +74,9 @@ #define NETGAME_DEFAULT_PORT 46631 #define HEDGEHOGS_PER_TEAM 8 +//Selected engine exit codes, see hedgewars/uConsts.pas +#define HWENGINE_EXITCODE_OK 0 +#define HWENGINE_EXITCODE_FATAL 52 // see https://en.wikipedia.org/wiki/List_of_colors /*define HW_TEAMCOLOR_ARRAY {0xff007fff, /. azure ./ \ diff -r c41b16ac2e05 -r d9f9e66543d7 QTfrontend/net/tcpBase.cpp --- a/QTfrontend/net/tcpBase.cpp Tue Jul 17 19:44:29 2018 +0200 +++ b/QTfrontend/net/tcpBase.cpp Tue Jul 17 20:13:41 2018 +0200 @@ -235,7 +235,7 @@ // show error message if there was an error that was not an engine's // fatal error - because that one already sent a info via IPC - if ((exitCode != 0) && (exitCode != 2)) + if ((exitCode != HWENGINE_EXITCODE_OK) && (exitCode != HWENGINE_EXITCODE_FATAL)) { // inform user that something bad happened MessageDialog::ShowFatalMessage(