diff options
author | Max Horn | 2011-06-06 10:59:23 +0200 |
---|---|---|
committer | Max Horn | 2011-06-17 20:50:38 +0200 |
commit | 7607a077fe589c2cdbdd587ba4c6285f1134c422 (patch) | |
tree | 1b1173f8eb759503d28216730e0665364a7367d0 /backends/platform/null | |
parent | 263e23bd810a87bf76023948923a5bb7c203ac2c (diff) | |
download | scummvm-rg350-7607a077fe589c2cdbdd587ba4c6285f1134c422.tar.gz scummvm-rg350-7607a077fe589c2cdbdd587ba4c6285f1134c422.tar.bz2 scummvm-rg350-7607a077fe589c2cdbdd587ba4c6285f1134c422.zip |
NULL: Add logMessage() implementation
Diffstat (limited to 'backends/platform/null')
-rw-r--r-- | backends/platform/null/null.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/backends/platform/null/null.cpp b/backends/platform/null/null.cpp index 106cde1699..4690a67c55 100644 --- a/backends/platform/null/null.cpp +++ b/backends/platform/null/null.cpp @@ -52,6 +52,8 @@ public: virtual uint32 getMillis(); virtual void delayMillis(uint msecs); virtual void getTimeAndDate(TimeDate &t) const {} + + virtual void logMessage(LogMessageType::Type type, const char *message); }; OSystem_NULL::OSystem_NULL() { @@ -97,6 +99,18 @@ uint32 OSystem_NULL::getMillis() { void OSystem_NULL::delayMillis(uint msecs) { } +void OSystem_NULL::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); +} + OSystem *OSystem_NULL_create() { return new OSystem_NULL(); } |