From 0fc175857ad83127541ce3a85cd701f85f7e844d Mon Sep 17 00:00:00 2001 From: Einar Johan Trøan Sømåen Date: Mon, 25 Jun 2012 15:26:33 +0200 Subject: WINTERMUTE: Move the engine-log over to a debug-channel. --- engines/wintermute/Base/BGame.cpp | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) (limited to 'engines/wintermute/Base') diff --git a/engines/wintermute/Base/BGame.cpp b/engines/wintermute/Base/BGame.cpp index 9544f1552e..69a0a31288 100644 --- a/engines/wintermute/Base/BGame.cpp +++ b/engines/wintermute/Base/BGame.cpp @@ -568,12 +568,6 @@ void CBGame::DEBUG_DebugDisable() { ////////////////////////////////////////////////////////////////////// void CBGame::LOG(HRESULT res, LPCSTR fmt, ...) { -#ifndef __IPHONEOS__ - if (!_dEBUG_DebugMode) return; -#endif - /* time_t timeNow; - time(&timeNow); - struct tm *tm = localtime(&timeNow);*/ int secs = g_system->getMillis() / 1000; int hours = secs / 3600; secs = secs % 3600; @@ -587,22 +581,16 @@ void CBGame::LOG(HRESULT res, LPCSTR fmt, ...) { vsprintf(buff, fmt, va); va_end(va); -#ifdef __IPHONEOS__ - printf("%02d:%02d:%02d: %s\n", tm->tm_hour, tm->tm_min, tm->tm_sec, buff); - fflush(stdout); -#else - if (_dEBUG_LogFile == NULL) return; - // redirect to an engine's own callback if (_engineLogCallback) { _engineLogCallback(buff, res, _engineLogCallbackData); } if (_debugMgr) _debugMgr->OnLog(res, buff); - warning("%02d:%02d:%02d: %s\n", hours, mins, secs, buff); + debugCN(kWinterMuteDebugLog, "%02d:%02d:%02d: %s\n", hours, mins, secs, buff); + //fprintf((FILE *)_dEBUG_LogFile, "%02d:%02d:%02d: %s\n", hours, mins, secs, buff); //fflush((FILE *)_dEBUG_LogFile); -#endif //QuickMessage(buff); } -- cgit v1.2.3