Skip to content

Commit

Permalink
console restricted only in debug mode
Browse files Browse the repository at this point in the history
  • Loading branch information
Rex109 committed Jul 2, 2023
1 parent ad6117d commit fd703ec
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions cod4qol/dllmain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit fd703ec

Please sign in to comment.