diff options
author | Max Horn | 2011-06-06 10:43:48 +0200 |
---|---|---|
committer | Max Horn | 2011-06-17 20:50:37 +0200 |
commit | 50896e6029076c6c5087cb2d3a918f7545b47008 (patch) | |
tree | 451f41f9a1f72c722c5dbf1a2500cdc5cfc54097 | |
parent | 4aa66fa5aa337c7aef7d20013f776168042d45f0 (diff) | |
download | scummvm-rg350-50896e6029076c6c5087cb2d3a918f7545b47008.tar.gz scummvm-rg350-50896e6029076c6c5087cb2d3a918f7545b47008.tar.bz2 scummvm-rg350-50896e6029076c6c5087cb2d3a918f7545b47008.zip |
WII: Add logMessage() implementation
-rw-r--r-- | backends/platform/wii/osystem.cpp | 18 | ||||
-rw-r--r-- | backends/platform/wii/osystem.h | 2 |
2 files changed, 15 insertions, 5 deletions
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 <time.h> -#define FORBIDDEN_SYMBOL_EXCEPTION_time_h - -#define FORBIDDEN_SYMBOL_EXCEPTION_printf -#define FORBIDDEN_SYMBOL_EXCEPTION_getcwd +#define FORBIDDEN_SYMBOL_ALLOW_ALL #include <unistd.h> @@ -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 |