From c6ba3ed17b2dc21a2efc90962514e67d4b8eeb7d Mon Sep 17 00:00:00 2001 From: someretical <29365738+someretical@users.noreply.github.com> Date: Tue, 18 Jan 2022 00:13:44 +1100 Subject: [PATCH] moved windows debugging code -incremented patch version --- src/main.cpp | 19 ++++++++++--------- text/VERSION.txt | 2 +- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 6d95bc2..00c89bb 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -16,15 +16,6 @@ * along with this program. If not, see . */ -// https:// stackoverflow.com/a/41701133 -#ifdef _WIN32 -if (AttachConsole(ATTACH_PARENT_PROCESS)) { - freopen("CONOUT$", "w", stdout); - freopen("CONOUT$", "w", stderr); - freopen("CONIN$", "r", stdin); -} -#endif - #include #include @@ -40,6 +31,16 @@ Q_DECLARE_METATYPE(td::CalendarButtonData) int main(int argc, char **argv) { +// https:// stackoverflow.com/a/41701133 +// Basically allows debugging output on Windows. +#ifdef _WIN32 + if (AttachConsole(ATTACH_PARENT_PROCESS)) { + freopen("CONOUT$", "w", stdout); + freopen("CONOUT$", "w", stderr); + freopen("CONIN$", "r", stdin); + } +#endif + // Make sure only 1 instance of the app is running at all times. Courtesy of https://stackoverflow.com/a/28172162 RunGuard guard("theoreticaldiary"); if (!guard.try_to_run()) { diff --git a/text/VERSION.txt b/text/VERSION.txt index 3f684d2..cc6c9a4 100644 --- a/text/VERSION.txt +++ b/text/VERSION.txt @@ -1 +1 @@ -2.3.4 +2.3.5