From 40719b78313fa7dd68648804cadc0fae803cf9c3 Mon Sep 17 00:00:00 2001 From: twanvl Date: Thu, 7 Aug 2008 02:48:20 +0000 Subject: [PATCH] removed write_stdout function, now handled by CLI class git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@1082 0fc631ac-6414-0410-93d0-97cfa31319b6 --- src/main.cpp | 26 -------------------------- 1 file changed, 26 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 463f4d28..18115315 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -51,32 +51,6 @@ class MSE : public wxApp { IMPLEMENT_APP(MSE) -// ----------------------------------------------------------------------------- : GUI/Console - -/// Write a message to the console if it is available, and to a message box otherwise -void write_stdout(const String& str) { - bool have_console = false; - #ifdef __WXMSW__ - // somehow detect whether to use console output - // GetStdHandle sometimes returns an invalid handle instead of INVALID_HANDLE_VALUE - // check with GetHandleInformation - HANDLE h = GetStdHandle(STD_OUTPUT_HANDLE); - DWORD flags; - bool ok = GetHandleInformation(h,&flags); - if (ok) have_console = true; - #elif __WXGTK__ - have_console = true; // always use console on *nix (?) - #endif - if (have_console) { - wxFileOutputStream file(wxFile::fd_stdout); - wxTextOutputStream t(file); - t.WriteString(str); - } else { - // no console, use a message box - wxMessageBox(str, _("Magic Set Editor"), wxOK | wxICON_INFORMATION); - } -} - // ----------------------------------------------------------------------------- : Checks void nag_about_ascii_version() {