From 5f9a5509d34af4245d5ef99b25e42afd81f18b84 Mon Sep 17 00:00:00 2001 From: Milxnor Date: Sun, 21 May 2023 21:05:42 -0400 Subject: [PATCH] disable windows console and add option for it --- Cobalt/dllmain.cpp | 2 ++ Cobalt/settings.h | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Cobalt/dllmain.cpp b/Cobalt/dllmain.cpp index 8c69f50..33e5732 100644 --- a/Cobalt/dllmain.cpp +++ b/Cobalt/dllmain.cpp @@ -90,10 +90,12 @@ void InitializeExitHook() DWORD WINAPI Main(LPVOID) { +#ifdef SHOW_WINDOWS_CONSOLE AllocConsole(); FILE* fptr; freopen_s(&fptr, "CONOUT$", "w+", stdout); +#endif SHOW_WINDOWS_CONSOLE std::cout << "Initializing Cobalt (made by Milxnor#3531).\n"; diff --git a/Cobalt/settings.h b/Cobalt/settings.h index abdef52..959112f 100644 --- a/Cobalt/settings.h +++ b/Cobalt/settings.h @@ -2,4 +2,6 @@ #define URL_PROTOCOL "http" #define URL_HOST "127.0.0.1" -#define URL_PORT "3551" \ No newline at end of file +#define URL_PORT "3551" + +// #define SHOW_WINDOWS_CONSOLE \ No newline at end of file