From 50896e6029076c6c5087cb2d3a918f7545b47008 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Mon, 6 Jun 2011 10:43:48 +0200 Subject: WII: Add logMessage() implementation --- backends/platform/wii/osystem.cpp | 18 +++++++++++++----- backends/platform/wii/osystem.h | 2 ++ 2 files changed, 15 insertions(+), 5 deletions(-) (limited to 'backends') diff --git a/backends/platform/wii/osystem.cpp b/backends/platform/wii/osystem.cpp index c6b23783b8..258a782cc4 100644 --- a/backends/platform/wii/osystem.cpp +++ b/backends/platform/wii/osystem.cpp @@ -19,11 +19,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -// Allow use of stuff in -#define FORBIDDEN_SYMBOL_EXCEPTION_time_h - -#define FORBIDDEN_SYMBOL_EXCEPTION_printf -#define FORBIDDEN_SYMBOL_EXCEPTION_getcwd +#define FORBIDDEN_SYMBOL_ALLOW_ALL #include @@ -291,6 +287,18 @@ void OSystem_Wii::showOptionsDialog() { _padAcceleration = 9 - ConfMan.getInt("wii_pad_acceleration"); } +void OSystem_Wii::logMessage(LogMessageType::Type type, const char *message) { + FILE *output = 0; + + if (type == LogMessageType::kInfo || type == LogMessageType::kDebug) + output = stdout; + else + output = stderr; + + fputs(message, output); + fflush(output); +} + #ifndef GAMECUBE Common::String OSystem_Wii::getSystemLanguage() const { const char *wiiCountries[] = { diff --git a/backends/platform/wii/osystem.h b/backends/platform/wii/osystem.h index 6863a6840e..64197f913a 100644 --- a/backends/platform/wii/osystem.h +++ b/backends/platform/wii/osystem.h @@ -211,6 +211,8 @@ public: virtual FilesystemFactory *getFilesystemFactory(); virtual void getTimeAndDate(TimeDate &t) const; + virtual void logMessage(LogMessageType::Type type, const char *message); + #ifndef GAMECUBE virtual Common::String getSystemLanguage() const; #endif // GAMECUBE -- cgit v1.2.3