diff src/win_gaim.c @ 7802:f1d2907db5be

[gaim-migrate @ 8448] Create console if gaim was run with d flag. committer: Tailor Script <tailor@pidgin.im>
author Herman Bloggs <hermanator12002@yahoo.com>
date Mon, 08 Dec 2003 01:41:22 +0000
parents 07156f873116
children fa6395637e2c
line wrap: on
line diff
--- a/src/win_gaim.c	Mon Dec 08 00:52:54 2003 +0000
+++ b/src/win_gaim.c	Mon Dec 08 01:41:22 2003 +0000
@@ -260,6 +260,12 @@
         char gaimdir[MAX_PATH];
         HMODULE hmod;
 
+        /* If debug flag used, create console for output */
+        if(strstr(lpszCmdLine, "-d")) {
+                if(AllocConsole())
+                        freopen ("CONOUT$", "w", stdout);
+        }
+
         /* Load exception handler if we have it */
         if(GetModuleFileName(NULL, gaimdir, MAX_PATH) != 0) {
                 char *tmp = gaimdir;