aboutsummaryrefslogtreecommitdiff
path: root/backends/platform/sdl/macosx
diff options
context:
space:
mode:
authorAlejandro Marzini2010-06-26 03:44:47 +0000
committerAlejandro Marzini2010-06-26 03:44:47 +0000
commit70e9a5b951e9086eb08aed8ce95b22eab0354637 (patch)
treec42fc424faad6b939879105bad306b29b55994f4 /backends/platform/sdl/macosx
parentd04a2a266dff688cc88931b4e11432ae8f4a7130 (diff)
downloadscummvm-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/macosx')
-rw-r--r--backends/platform/sdl/macosx/macosx.cpp16
-rw-r--r--backends/platform/sdl/macosx/macosx.h1
2 files changed, 3 insertions, 14 deletions
diff --git a/backends/platform/sdl/macosx/macosx.cpp b/backends/platform/sdl/macosx/macosx.cpp
index 446c41dd4e..d6faf40294 100644
--- a/backends/platform/sdl/macosx/macosx.cpp
+++ b/backends/platform/sdl/macosx/macosx.cpp
@@ -33,8 +33,6 @@
#include "CoreFoundation/CoreFoundation.h"
-#define DEFAULT_CONFIG_FILE "Library/Preferences/ScummVM Preferences"
-
OSystem_MacOSX::OSystem_MacOSX() {
}
@@ -51,18 +49,8 @@ void OSystem_MacOSX::initBackend() {
OSystem_POSIX::initBackend();
}
-Common::String OSystem_MacOSX::getDefaultConfigFileName() {
- char configFile[MAXPATHLEN];
-
- // On UNIX type systems, by default we store the config file inside
- // to the HOME directory of the user.
- const char *home = getenv("HOME");
- if (home != NULL && strlen(home) < MAXPATHLEN)
- snprintf(configFile, MAXPATHLEN, "%s/%s", home, DEFAULT_CONFIG_FILE);
- else
- strcpy(configFile, DEFAULT_CONFIG_FILE);
-
- return configFile;
+const char *OSystem_MacOSX::getConfigFileNameString() {
+ return "Library/Preferences/ScummVM Preferences";
}
void OSystem_MacOSX::addSysArchivesToSearchSet(Common::SearchSet &s, int priority) {
diff --git a/backends/platform/sdl/macosx/macosx.h b/backends/platform/sdl/macosx/macosx.h
index 0b665d1132..a6f902b97b 100644
--- a/backends/platform/sdl/macosx/macosx.h
+++ b/backends/platform/sdl/macosx/macosx.h
@@ -38,6 +38,7 @@ public:
void addSysArchivesToSearchSet(Common::SearchSet &s, int priority = 0);
protected:
+ const char *getConfigFileNameString();
Common::String getDefaultConfigFileName();
};