From 45099eba296556bbbd8a93eef7b3143cc97cba6d Mon Sep 17 00:00:00 2001 From: Anonymous275 <36374260+Anonymous-275@users.noreply.github.com> Date: Wed, 19 Jan 2022 23:36:18 +0200 Subject: [PATCH] Added SIGBREAK --- include/discord-rpc | 1 + src/Launcher.cpp | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) create mode 160000 include/discord-rpc diff --git a/include/discord-rpc b/include/discord-rpc new file mode 160000 index 0000000..7c41a8e --- /dev/null +++ b/include/discord-rpc @@ -0,0 +1 @@ +Subproject commit 7c41a8ec1969b9b4b0c2360c6b632ebd16a92b69 diff --git a/src/Launcher.cpp b/src/Launcher.cpp index f3202a9..4753f41 100644 --- a/src/Launcher.cpp +++ b/src/Launcher.cpp @@ -7,6 +7,7 @@ #include "Launcher.h" #include "Logger.h" #include "BeamNG.h" +#include #include #include @@ -44,7 +45,7 @@ Launcher::~Launcher() { } void ShutdownHandler(int sig) { - LOG(INFO) << "Got signal " << sig; + LOG(INFO) << "Got signal (" << sig << ") Launcher shutting down"; Launcher::StaticAbort(); exit(sig); } @@ -64,6 +65,7 @@ void Launcher::WindowsInit() { signal(SIGINT, ShutdownHandler); signal(SIGTERM, ShutdownHandler); signal(SIGABRT, ShutdownHandler); + signal(SIGBREAK, ShutdownHandler); } void Launcher::LaunchGame() {