From a4d235f805a21871bc3196c915f5d1ab7009641e Mon Sep 17 00:00:00 2001 From: milek7 Date: Sun, 28 Jan 2018 12:28:51 +0100 Subject: [PATCH 1/2] brake control fix, skip destructors at exit --- EU07.cpp | 2 ++ Train.cpp | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/EU07.cpp b/EU07.cpp index 02cc75a0..355514c3 100644 --- a/EU07.cpp +++ b/EU07.cpp @@ -439,5 +439,7 @@ int main(int argc, char *argv[]) glfwDestroyWindow(window); glfwTerminate(); + _exit(0); // skip destructors, there are ordering errors which causes segfaults + return 0; } diff --git a/Train.cpp b/Train.cpp index 5f50ff49..d20c3729 100644 --- a/Train.cpp +++ b/Train.cpp @@ -831,7 +831,7 @@ void TTrain::OnCommand_trainbrakedecrease( TTrain *Train, command_data const &Co Train->mvOccupied->BrakeLevelAdd( -Global::fBrakeStep * Command.time_delta ); } else { - Train->set_train_brake( Train->mvOccupied->BrakeCtrlPos - Global::fBrakeStep * Command.time_delta ); + Train->set_train_brake( Train->mvOccupied->fBrakeCtrlPos - Global::fBrakeStep * Command.time_delta ); } } else if (Command.action == GLFW_RELEASE) { From a593b6097f7574e781dd4d024f6e24dc0adf8be1 Mon Sep 17 00:00:00 2001 From: milek7 Date: Sun, 28 Jan 2018 13:26:54 +0100 Subject: [PATCH 2/2] version --- Console.cpp | 1 + EU07.cpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Console.cpp b/Console.cpp index 4658372a..983c35e3 100644 --- a/Console.cpp +++ b/Console.cpp @@ -14,6 +14,7 @@ http://mozilla.org/MPL/2.0/. #include "LPT.h" #include "Logs.h" #include "PoKeys55.h" +#include "usefull.h" //--------------------------------------------------------------------------- // Ra: klasa statyczna gromadząca sygnały sterujące oraz informacje zwrotne diff --git a/EU07.cpp b/EU07.cpp index 355514c3..4b2653f6 100644 --- a/EU07.cpp +++ b/EU07.cpp @@ -250,7 +250,7 @@ int main(int argc, char *argv[]) } #endif - Global::asVersion = "NG"; + Global::asVersion = "M7 18.01"; for (int i = 1; i < argc; ++i) {