diff options
Diffstat (limited to 'common/system.cpp')
-rw-r--r-- | common/system.cpp | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/common/system.cpp b/common/system.cpp index 816d444c89..81fe761f1d 100644 --- a/common/system.cpp +++ b/common/system.cpp @@ -23,8 +23,27 @@ * */ +// Disable symbol overrides so that we can use system headers. +// FIXME: Necessary for the PS2 port, should get rid of this eventually. +#define FORBIDDEN_SYMBOL_ALLOW_ALL + #include "common/system.h" +#ifdef __PLAYSTATION2__ + // for those replaced fopen/fread/etc functions + #include "backends/platform/ps2/fileio.h" + + #define fputs(str, file) ps2_fputs(str, file) + #define fflush(a) ps2_fflush(a) +#endif + +#ifdef __DS__ + #include "backends/fs/ds/ds-fs.h" + + #define fputs(str, file) DS::std_fwrite(str, strlen(str), 1, file) + #define fflush(file) DS::std_fflush(file) +#endif + OSystem *g_system = 0; OSystem::OSystem() { @@ -53,3 +72,25 @@ bool OSystem::setGraphicsMode(const char *name) { return false; } + +void OSystem::fatalError() { + quit(); + exit(1); +} + +void OSystem::logMessage(LogMessageType::Type type, const char *message) { + FILE *output = 0; + + if (type == LogMessageType::kDebug) + output = stdout; + else + output = stderr; + + fputs(message, output); + fflush(output); +} + +Common::String OSystem::getSystemLanguage() const { + return "en_US"; +} + |