From a97289cf4cada58536c16f0b6168a9b959213b6c Mon Sep 17 00:00:00 2001 From: xwt Date: Fri, 30 Jan 2004 08:05:08 +0000 Subject: [PATCH 1/1] 2004/01/20 20:33:47 darcs-hash:20040130080508-3ac31-e8efbff8bfac7ecbd288522190ed90bc99641904.gz --- src/org/xwt/Main.java | 2 +- src/org/xwt/plat/Win32.cc | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/org/xwt/Main.java b/src/org/xwt/Main.java index 468e69b..49eb2b2 100644 --- a/src/org/xwt/Main.java +++ b/src/org/xwt/Main.java @@ -34,7 +34,7 @@ public class Main { System.err.println("Usage: xwt [-s] [-v] [-l /] 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(""); diff --git a/src/org/xwt/plat/Win32.cc b/src/org/xwt/plat/Win32.cc index c278998..1b3ccea 100644 --- a/src/org/xwt/plat/Win32.cc +++ b/src/org/xwt/plat/Win32.cc @@ -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() { -- 1.7.10.4