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/win32/win32.cpp | |
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/win32/win32.cpp')
-rw-r--r-- | backends/platform/sdl/win32/win32.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/backends/platform/sdl/win32/win32.cpp b/backends/platform/sdl/win32/win32.cpp index 4d585add77..907059feaf 100644 --- a/backends/platform/sdl/win32/win32.cpp +++ b/backends/platform/sdl/win32/win32.cpp @@ -44,8 +44,6 @@ #include "backends/fs/windows/windows-fs-factory.h" -#define DEFAULT_CONFIG_FILE "scummvm.ini" - OSystem_Win32::OSystem_Win32() { } @@ -57,6 +55,10 @@ void OSystem_Win32::init() { OSystem_SDL::init(); } +const char *OSystem_Win32::getConfigFileNameString() { + return "\\scummvm.ini"; +} + Common::String OSystem_Win32::getDefaultConfigFileName() { char configFile[MAXPATHLEN]; @@ -80,14 +82,14 @@ Common::String OSystem_Win32::getDefaultConfigFileName() { strcat(configFile, "\\ScummVM"); CreateDirectory(configFile, NULL); - strcat(configFile, "\\" DEFAULT_CONFIG_FILE); + strcat(configFile, getConfigFileNameString()); FILE *tmp = NULL; if ((tmp = fopen(configFile, "r")) == NULL) { // Check windows directory char oldConfigFile[MAXPATHLEN]; GetWindowsDirectory(oldConfigFile, MAXPATHLEN); - strcat(oldConfigFile, "\\" DEFAULT_CONFIG_FILE); + strcat(oldConfigFile, getConfigFileNameString()); if ((tmp = fopen(oldConfigFile, "r"))) { strcpy(configFile, oldConfigFile); @@ -99,7 +101,7 @@ Common::String OSystem_Win32::getDefaultConfigFileName() { } else { // Check windows directory GetWindowsDirectory(configFile, MAXPATHLEN); - strcat(configFile, "\\" DEFAULT_CONFIG_FILE); + strcat(configFile, getConfigFileNameString()); } return configFile; |