From df56e29d2e92ddb779edaf39d1026e3db77ee231 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Mon, 25 Nov 2002 23:28:10 +0000 Subject: [PATCH] Moved config file to a more Macish location on OS X svn-id: r5716 --- README | 9 +++++---- common/main.cpp | 8 ++++++-- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/README b/README index 726cd06ba73..a7cd06f6c27 100644 --- a/README +++ b/README @@ -502,11 +502,12 @@ Configuration file: ------------------- By default, the configuration file is saved in, and loaded from: - Windows: \scummvm.ini, - Linux: ~/.scummvmrc - Others: scummvm.ini in the current directory + Windows: \scummvm.ini, + Linux: ~/.scummvmrc + Mac OS X: ~/Library/Preferences/ScummVM Preferences + Others: scummvm.ini in the current directory -An example config file is as follows: +An example config file looks as follows: [scummvm] gfx_mode=supereagle diff --git a/common/main.cpp b/common/main.cpp index 26c6d6880bd..b411bca065a 100644 --- a/common/main.cpp +++ b/common/main.cpp @@ -48,7 +48,11 @@ extern "C" int main(int argc, char *argv[]); #ifndef MAXPATHLEN #define MAXPATHLEN 256 #endif +#ifdef MACOSX +#define DEFAULT_CONFIG_FILE "Library/Preferences/ScummVM Preferences" +#else #define DEFAULT_CONFIG_FILE ".scummvmrc" +#endif #else #define DEFAULT_CONFIG_FILE "scummvm.ini" #endif @@ -153,9 +157,9 @@ int main(int argc, char *argv[]) sprintf(scummhome,"%s/%s", getenv("HOME"), DEFAULT_CONFIG_FILE); else strcpy(scummhome,DEFAULT_CONFIG_FILE); #else - char scummhome[255]; + char scummhome[256]; #if defined (WIN32) && !defined(_WIN32_WCE) - GetWindowsDirectory(scummhome, 255); + GetWindowsDirectory(scummhome, 256); strcat(scummhome, "\\"); strcat(scummhome, DEFAULT_CONFIG_FILE); #else