From 5a668583cdf507aec3cadb2a225790962b114617 Mon Sep 17 00:00:00 2001 From: vsonnier Date: Sat, 13 Aug 2016 21:31:21 +0200 Subject: [PATCH] WINDOWS_NO_SECONDARY_CONSOLE: The explicit allocated Console on Windows apparently tends to hang the application more, suppress it --- src/CubicSDR.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/CubicSDR.cpp b/src/CubicSDR.cpp index bff648b..11195f9 100644 --- a/src/CubicSDR.cpp +++ b/src/CubicSDR.cpp @@ -165,8 +165,11 @@ bool CubicSDR::OnInit() { return false; } - // // console output for Windows: available in DEBUG or in case of ENABLE_DIGITAL_LAB -#if (defined(WIN32) && (defined(ENABLE_DIGITAL_LAB) || defined(_DEBUG))) + //Deactivated code to allocate an explicit Console on Windows. + //This tends to hang the apllication on heavy demod (re)creation. + //To continue to debug with std::cout traces, simply run CubicSDR in a MINSYS2 compatble shell on Windows: + //ex: Cygwin shell, Git For Windows Bash shell.... +#if (0) if (AllocConsole()) { freopen("CONOUT$", "w", stdout); SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_GREEN | FOREGROUND_BLUE | FOREGROUND_RED);