Skip to content

Commit 894b4f6

Browse files
committed
Displays Console. I'm only using it for testing
1 parent 9f7117f commit 894b4f6

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

Client/core/Core.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,15 @@ int WINAPI DllMain(HINSTANCE hModule, DWORD dwReason, PVOID pvNothing)
3131
WriteDebugEvent( SString( "DLL_PROCESS_ATTACH %08x", pvNothing ) );
3232
if ( IsGTAProcess() )
3333
{
34+
if (AllocConsole())
35+
{
36+
freopen("CONIN$", "r", stdin);
37+
freopen("CONOUT$", "w", stdout);
38+
freopen("CONOUT$", "w", stderr);
39+
printf("Okay, enjoy your console :)\n");
40+
}
41+
42+
3443
WriteDebugEvent( SString( "ModuleFileName: %s", *GetLaunchPathFilename() ) );
3544

3645
AddUtf8FileHooks();

0 commit comments

Comments
 (0)