diff options
author | Max Horn | 2008-10-16 17:18:15 +0000 |
---|---|---|
committer | Max Horn | 2008-10-16 17:18:15 +0000 |
commit | 36311eefb44a43221665bf6d5d11a4d6fd9f330f (patch) | |
tree | 0bc717c6fb5709a0aefe415506877e89b82d2e1d /common | |
parent | 0cd49391103a4d7ea33c2a8d61f5c93ab3af0155 (diff) | |
download | scummvm-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 'common')
-rw-r--r-- | common/system.cpp | 37 |
1 files changed, 4 insertions, 33 deletions
diff --git a/common/system.cpp b/common/system.cpp index 0e29dded38..a07ffba6d6 100644 --- a/common/system.cpp +++ b/common/system.cpp @@ -122,48 +122,19 @@ void OSystem::clearScreen() { /* -FIXME: The config file loading code below needs to be cleaned up. - Port specific variants should be pushed into the respective ports. - - Ideally, the default OSystem::openConfigFileForReading/Writing methods - should be removed completely. + FIXME: Maybe we should push the default config file loading/saving code below + out to all the backends? */ -#ifdef __PLAYSTATION2__ -#include "backends/platform/ps2/systemps2.h" -#endif - -#ifdef IPHONE -#include "backends/platform/iphone/osys_iphone.h" -#endif - - #if defined(UNIX) #define DEFAULT_CONFIG_FILE ".scummvmrc" #else #define DEFAULT_CONFIG_FILE "scummvm.ini" #endif -static Common::String getDefaultConfigFileName() { - char configFile[MAXPATHLEN]; -#if defined(PALMOS_MODE) - strcpy(configFile,"/PALM/Programs/ScummVM/" DEFAULT_CONFIG_FILE); -#elif defined(IPHONE) - strcpy(configFile, OSystem_IPHONE::getConfigPath()); -#elif defined(__PLAYSTATION2__) - ((OSystem_PS2*)g_system)->makeConfigPath(configFile); -#elif defined(__PSP__) - strcpy(configFile, "ms0:/" DEFAULT_CONFIG_FILE); -#else - strcpy(configFile, DEFAULT_CONFIG_FILE); -#endif - - return configFile; -} - Common::SeekableReadStream *OSystem::openConfigFileForReading() { - Common::FSNode file(getDefaultConfigFileName()); + Common::FSNode file(DEFAULT_CONFIG_FILE); return file.openForReading(); } @@ -171,7 +142,7 @@ Common::WriteStream *OSystem::openConfigFileForWriting() { #ifdef __DC__ return 0; #else - Common::FSNode file(getDefaultConfigFileName()); + Common::FSNode file(DEFAULT_CONFIG_FILE); return file.openForWriting(); #endif } |