diff options
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(); }; |