changeset 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 9db4ec5e6bca
children ec291c2cad6a
files src/win_gaim.c
diffstat 1 files changed, 6 insertions(+), 0 deletions(-) [+]
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;