diff options
Diffstat (limited to 'backends/platform/sdl/win32')
-rw-r--r-- | backends/platform/sdl/win32/win32.cpp | 12 | ||||
-rw-r--r-- | backends/platform/sdl/win32/win32.h | 1 |
2 files changed, 8 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; diff --git a/backends/platform/sdl/win32/win32.h b/backends/platform/sdl/win32/win32.h index e4541e314d..e8bc255459 100644 --- a/backends/platform/sdl/win32/win32.h +++ b/backends/platform/sdl/win32/win32.h @@ -36,6 +36,7 @@ public: void init(); protected: + const char *getConfigFileNameString(); Common::String getDefaultConfigFileName(); }; |