From 70e9a5b951e9086eb08aed8ce95b22eab0354637 Mon Sep 17 00:00:00 2001 From: Alejandro Marzini Date: Sat, 26 Jun 2010 03:44:47 +0000 Subject: Removed DEFAULT_CONFIG_FILE define in favor of new getConfigFileNameString function. svn-id: r50301 --- backends/platform/sdl/posix/posix.cpp | 10 ++++++---- backends/platform/sdl/posix/posix.h | 1 + 2 files changed, 7 insertions(+), 4 deletions(-) (limited to 'backends/platform/sdl/posix') 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(); }; -- cgit v1.2.3