aboutsummaryrefslogtreecommitdiff
path: root/backends/platform/ps2
diff options
context:
space:
mode:
authorMax Horn2008-10-16 17:18:15 +0000
committerMax Horn2008-10-16 17:18:15 +0000
commit36311eefb44a43221665bf6d5d11a4d6fd9f330f (patch)
tree0bc717c6fb5709a0aefe415506877e89b82d2e1d /backends/platform/ps2
parent0cd49391103a4d7ea33c2a8d61f5c93ab3af0155 (diff)
downloadscummvm-rg350-36311eefb44a43221665bf6d5d11a4d6fd9f330f.tar.gz
scummvm-rg350-36311eefb44a43221665bf6d5d11a4d6fd9f330f.tar.bz2
scummvm-rg350-36311eefb44a43221665bf6d5d11a4d6fd9f330f.zip
OSYSTEM: Pushed out some port specific code from common/system.cpp to the respective ports
svn-id: r34812
Diffstat (limited to 'backends/platform/ps2')
-rw-r--r--backends/platform/ps2/systemps2.cpp15
-rw-r--r--backends/platform/ps2/systemps2.h3
2 files changed, 18 insertions, 0 deletions
diff --git a/backends/platform/ps2/systemps2.cpp b/backends/platform/ps2/systemps2.cpp
index d4dd9aedcf..85eb303e86 100644
--- a/backends/platform/ps2/systemps2.cpp
+++ b/backends/platform/ps2/systemps2.cpp
@@ -770,6 +770,7 @@ void OSystem_PS2::quit(void) {
}
void OSystem_PS2::makeConfigPath(char *dest) {
+ // FIXME: Maybe merge this method into openConfigFileForReading/openConfigFileForWriting ?
FILE *handle;
strcpy(dest, "cdfs:/ScummVM.ini");
handle = ps2_fopen(dest, "r");
@@ -783,6 +784,20 @@ void OSystem_PS2::makeConfigPath(char *dest) {
strcpy(dest, "mc0:ScummVM/scummvm.ini");
}
+Common::SeekableReadStream *OSystem_PS2::openConfigFileForReading() {
+ char configFile[MAXPATHLEN];
+ makeConfigPath(configFile);
+ Common::FSNode file(configFile);
+ return file.openForReading();
+}
+
+Common::WriteStream *OSystem_PS2::openConfigFileForWriting() {
+ char configFile[MAXPATHLEN];
+ makeConfigPath(configFile);
+ Common::FSNode file(configFile);
+ return file.openForWriting();
+}
+
bool OSystem_PS2::runningFromHost(void) {
return (_bootDevice == HOST);
}
diff --git a/backends/platform/ps2/systemps2.h b/backends/platform/ps2/systemps2.h
index 08975ab2c8..9539baf4f5 100644
--- a/backends/platform/ps2/systemps2.h
+++ b/backends/platform/ps2/systemps2.h
@@ -107,6 +107,9 @@ public:
virtual void quit();
+ virtual Common::SeekableReadStream *openConfigFileForReading();
+ virtual Common::WriteStream *openConfigFileForWriting();
+
virtual OverlayColor RGBToColor(uint8 r, uint8 g, uint8 b);
virtual void colorToRGB(OverlayColor color, uint8 &r, uint8 &g, uint8 &b);