aboutsummaryrefslogtreecommitdiff
path: root/backends/platform/sdl/riscos
diff options
context:
space:
mode:
authorCameron Cawley2019-08-04 21:45:17 +0100
committerFilippos Karapetis2019-08-05 10:01:30 +0300
commit8b8fb6d3a4748ded6f47cf057fc22f9aeab225d0 (patch)
tree363e8777d147e90a75ece84e6aca42be60697dc6 /backends/platform/sdl/riscos
parentd10c69d0d1c596d4ecce9cbf967c75f3cf95a47b (diff)
downloadscummvm-rg350-8b8fb6d3a4748ded6f47cf057fc22f9aeab225d0.tar.gz
scummvm-rg350-8b8fb6d3a4748ded6f47cf057fc22f9aeab225d0.tar.bz2
scummvm-rg350-8b8fb6d3a4748ded6f47cf057fc22f9aeab225d0.zip
SDL: Simplify implementation of createLogFile()
Diffstat (limited to 'backends/platform/sdl/riscos')
-rw-r--r--backends/platform/sdl/riscos/riscos.cpp16
-rw-r--r--backends/platform/sdl/riscos/riscos.h12
2 files changed, 4 insertions, 24 deletions
diff --git a/backends/platform/sdl/riscos/riscos.cpp b/backends/platform/sdl/riscos/riscos.cpp
index 3cd9616585..a0173ed653 100644
--- a/backends/platform/sdl/riscos/riscos.cpp
+++ b/backends/platform/sdl/riscos/riscos.cpp
@@ -119,24 +119,14 @@ Common::String OSystem_RISCOS::getDefaultConfigFileName() {
return "/<Choices$Write>/ScummVM/scummvmrc";
}
-Common::WriteStream *OSystem_RISCOS::createLogFile() {
- // Start out by resetting _logFilePath, so that in case
- // of a failure, we know that no log file is open.
- _logFilePath.clear();
-
+Common::String OSystem_RISCOS::getDefaultLogFileName() {
Common::String logFile = "/<Choices$Write>/ScummVM/Logs";
if (!Riscos::assureDirectoryExists(logFile)) {
- return 0;
+ return Common::String();
}
- logFile += "/scummvm";
-
- Common::FSNode file(logFile);
- Common::WriteStream *stream = file.createWriteStream();
- if (stream)
- _logFilePath = logFile;
- return stream;
+ return logFile + "/scummvm";
}
#endif
diff --git a/backends/platform/sdl/riscos/riscos.h b/backends/platform/sdl/riscos/riscos.h
index 49ac5a2264..7abeb4f8ef 100644
--- a/backends/platform/sdl/riscos/riscos.h
+++ b/backends/platform/sdl/riscos/riscos.h
@@ -37,18 +37,8 @@ public:
virtual void logMessage(LogMessageType::Type type, const char *message);
protected:
- /**
- * The path of the currently open log file, if any.
- *
- * @note This is currently a string and not an FSNode for simplicity;
- * e.g. we don't need to include fs.h here, and currently the
- * only use of this value is to use it to open the log file in an
- * editor; for that, we need it only as a string anyway.
- */
- Common::String _logFilePath;
-
virtual Common::String getDefaultConfigFileName();
- virtual Common::WriteStream *createLogFile();
+ virtual Common::String getDefaultLogFileName();
};
#endif