diff options
author | Alejandro Marzini | 2010-06-26 03:44:47 +0000 |
---|---|---|
committer | Alejandro Marzini | 2010-06-26 03:44:47 +0000 |
commit | 70e9a5b951e9086eb08aed8ce95b22eab0354637 (patch) | |
tree | c42fc424faad6b939879105bad306b29b55994f4 /backends/platform/sdl/posix | |
parent | d04a2a266dff688cc88931b4e11432ae8f4a7130 (diff) | |
download | scummvm-rg350-70e9a5b951e9086eb08aed8ce95b22eab0354637.tar.gz scummvm-rg350-70e9a5b951e9086eb08aed8ce95b22eab0354637.tar.bz2 scummvm-rg350-70e9a5b951e9086eb08aed8ce95b22eab0354637.zip |
Removed DEFAULT_CONFIG_FILE define in favor of new getConfigFileNameString function.
svn-id: r50301
Diffstat (limited to 'backends/platform/sdl/posix')
-rw-r--r-- | backends/platform/sdl/posix/posix.cpp | 10 | ||||
-rw-r--r-- | backends/platform/sdl/posix/posix.h | 1 |
2 files changed, 7 insertions, 4 deletions
diff --git a/backends/platform/sdl/posix/posix.cpp b/backends/platform/sdl/posix/posix.cpp index 75f09c3555..0b770bc512 100644 --- a/backends/platform/sdl/posix/posix.cpp +++ b/backends/platform/sdl/posix/posix.cpp @@ -41,8 +41,6 @@ #include "backends/fs/posix/posix-fs-factory.h" -#define DEFAULT_CONFIG_FILE ".scummvmrc" - OSystem_POSIX::OSystem_POSIX() { } @@ -63,6 +61,10 @@ void OSystem_POSIX::initBackend() { OSystem_SDL::initBackend(); } +const char *OSystem_POSIX::getConfigFileNameString() { + return ".scummvmrc"; +} + Common::String OSystem_POSIX::getDefaultConfigFileName() { char configFile[MAXPATHLEN]; @@ -76,9 +78,9 @@ Common::String OSystem_POSIX::getDefaultConfigFileName() { // from the Springboard, is /. Which we don't want. const char *home = getenv("HOME"); if (home != NULL && strlen(home) < MAXPATHLEN) - snprintf(configFile, MAXPATHLEN, "%s/%s", home, DEFAULT_CONFIG_FILE); + snprintf(configFile, MAXPATHLEN, "%s/%s", home, getConfigFileNameString()); else - strcpy(configFile, DEFAULT_CONFIG_FILE); + strcpy(configFile, getConfigFileNameString()); return configFile; } diff --git a/backends/platform/sdl/posix/posix.h b/backends/platform/sdl/posix/posix.h index ca912c9d87..7e7e388229 100644 --- a/backends/platform/sdl/posix/posix.h +++ b/backends/platform/sdl/posix/posix.h @@ -38,6 +38,7 @@ public: virtual void initBackend(); protected: + virtual const char *getConfigFileNameString(); virtual Common::String getDefaultConfigFileName(); }; |