2004/01/20 20:33:47
authorxwt <xwt@xwt.org>
Fri, 30 Jan 2004 08:05:08 +0000 (08:05 +0000)
committerxwt <xwt@xwt.org>
Fri, 30 Jan 2004 08:05:08 +0000 (08:05 +0000)
darcs-hash:20040130080508-3ac31-e8efbff8bfac7ecbd288522190ed90bc99641904.gz

src/org/xwt/Main.java
src/org/xwt/plat/Win32.cc

index 468e69b..49eb2b2 100644 (file)
@@ -34,7 +34,7 @@ public class Main {
         System.err.println("Usage: xwt [-s] [-v] [-l <port>/<url>] source-location [initial-template]");
         System.err.println("");
         System.err.println("Options:");
-        System.err.println("    -v verbose logging");
+        System.err.println("    -v verbose logging (required for logging on Win32)");
         System.err.println("    -s [not yet supported]");
         System.err.println("    -l [not yet supported]");
         System.err.println("");
index c278998..1b3ccea 100644 (file)
@@ -146,6 +146,12 @@ static unsigned char hand_cursor_and[32 * 4] = {
   0xFF, 0xFF, 0xFF, 0xFF
 };
 
+void org::xwt::plat::Win32::natPreInit() {
+    if (org::xwt::util::Log::verbose) {
+        AllocConsole();
+        freopen("CONOUT$", "w+t", stderr);
+    }
+}
 
 void org::xwt::plat::Win32::natInit() {