From 6eb8bfc29a2ad370c0c219ebec9b7c43de159439 Mon Sep 17 00:00:00 2001 From: AlexandreRouma Date: Mon, 14 Feb 2022 19:36:49 +0100 Subject: [PATCH] Fixed close not working --- core/backends/glfw/backend.cpp | 2 ++ core/src/core.cpp | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/core/backends/glfw/backend.cpp b/core/backends/glfw/backend.cpp index 232b9e06..c439b459 100644 --- a/core/backends/glfw/backend.cpp +++ b/core/backends/glfw/backend.cpp @@ -285,6 +285,8 @@ namespace backend { render(); } + + return 0; } int end() { diff --git a/core/src/core.cpp b/core/src/core.cpp index 042ad089..cc0db1f6 100644 --- a/core/src/core.cpp +++ b/core/src/core.cpp @@ -69,7 +69,7 @@ int sdrpp_main(int argc, char* argv[]) { if (!options::parse(argc, argv)) { return -1; } #ifdef _WIN32 - if (!options::opts.showConsole) { FreeConsole(); } + if (!options::opts.showConsole && !options::opts.serverMode) { FreeConsole(); } #endif // Check root directory @@ -338,5 +338,6 @@ int sdrpp_main(int argc, char* argv[]) { core::configManager.save(); #endif + spdlog::info("Exiting successfully"); return 0; }