From fd703ec31bccc03e5dfcae6705e497dca21735fe Mon Sep 17 00:00:00 2001 From: Rex109 Date: Sun, 2 Jul 2023 04:20:59 +0200 Subject: [PATCH] console restricted only in debug mode --- cod4qol/dllmain.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/cod4qol/dllmain.cpp b/cod4qol/dllmain.cpp index 1130a7c..5410284 100644 --- a/cod4qol/dllmain.cpp +++ b/cod4qol/dllmain.cpp @@ -16,9 +16,11 @@ BOOL APIENTRY DllMain( HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpRese case DLL_PROCESS_ATTACH: s_hModule = hModule; - FILE* _con; - AllocConsole(); - freopen_s(&_con, "CONOUT$", "w", stdout); + #ifdef _DEBUG + FILE* _con; + AllocConsole(); + freopen_s(&_con, "CONOUT$", "w", stdout); + #endif std::thread(Initialize).detach(); break;