From 6be000a530d06e8f765d7eeeb98fe75b5595b916 Mon Sep 17 00:00:00 2001 From: dfighter1985 Date: Sun, 22 Feb 2015 17:20:24 +0100 Subject: [PATCH] Backed out from 5942903 --- code/nel/src/misc/debug.cpp | 8 +++++++- code/nel/src/misc/displayer.cpp | 2 ++ code/nel/src/misc/report.cpp | 12 ++++++++++++ 3 files changed, 21 insertions(+), 1 deletion(-) diff --git a/code/nel/src/misc/debug.cpp b/code/nel/src/misc/debug.cpp index aaa551f1f..2d09f5ef8 100644 --- a/code/nel/src/misc/debug.cpp +++ b/code/nel/src/misc/debug.cpp @@ -1193,7 +1193,13 @@ void createDebug (const char *logPath, bool logInFile, bool eraseLastLog) INelContext::getInstance().setAssertLog(new CLog (CLog::LOG_ASSERT)); sd = new CStdDisplayer ("DEFAULT_SD"); - DefaultMsgBoxDisplayer = new CMsgBoxDisplayer ("DEFAULT_MBD"); + +#ifdef NL_OS_WINDOWS + if (TrapCrashInDebugger || !IsDebuggerPresent ()) + { + DefaultMsgBoxDisplayer = new CMsgBoxDisplayer ("DEFAULT_MBD"); + } +#endif #if LOG_IN_FILE if (logInFile) diff --git a/code/nel/src/misc/displayer.cpp b/code/nel/src/misc/displayer.cpp index 35ae27964..d48c44d02 100644 --- a/code/nel/src/misc/displayer.cpp +++ b/code/nel/src/misc/displayer.cpp @@ -529,6 +529,7 @@ void CFileDisplayer::doDisplay ( const CLog::TDisplayInfo& args, const char *mes // in release "" void CMsgBoxDisplayer::doDisplay ( const CLog::TDisplayInfo& args, const char *message) { +#ifdef NL_OS_WINDOWS bool needSpace = false; // stringstream ss; @@ -719,6 +720,7 @@ void CMsgBoxDisplayer::doDisplay ( const CLog::TDisplayInfo& args, const char *m } */ } +#endif } diff --git a/code/nel/src/misc/report.cpp b/code/nel/src/misc/report.cpp index b165e29f5..88c707aaa 100644 --- a/code/nel/src/misc/report.cpp +++ b/code/nel/src/misc/report.cpp @@ -52,6 +52,16 @@ void setReportEmailFunction (void *emailFunction) EmailFunction = (TEmailFunction)emailFunction; } +#ifndef NL_OS_WINDOWS + +// GNU/Linux, do nothing + +void report () +{ +} + +#else + TReportResult report (const std::string &title, const std::string &header, const std::string &subject, const std::string &body, bool enableCheckIgnore, uint debugButton, bool ignoreButton, sint quitButton, bool sendReportButton, bool &ignoreNextTime, const string &attachedFile) { std::string fname = "rcerrorlog.txt"; @@ -82,5 +92,7 @@ TReportResult report (const std::string &title, const std::string &header, const return ReportQuit; } +#endif + } // NLMISC