Moved config file to a more Macish location on OS X
svn-id: r5716
This commit is contained in:
parent
850428d1a5
commit
df56e29d2e
2 changed files with 11 additions and 6 deletions
9
README
9
README
|
@ -502,11 +502,12 @@ Configuration file:
|
||||||
-------------------
|
-------------------
|
||||||
By default, the configuration file is saved in, and loaded from:
|
By default, the configuration file is saved in, and loaded from:
|
||||||
|
|
||||||
Windows: <windir>\scummvm.ini,
|
Windows: <windir>\scummvm.ini,
|
||||||
Linux: ~/.scummvmrc
|
Linux: ~/.scummvmrc
|
||||||
Others: scummvm.ini in the current directory
|
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]
|
[scummvm]
|
||||||
gfx_mode=supereagle
|
gfx_mode=supereagle
|
||||||
|
|
|
@ -48,7 +48,11 @@ extern "C" int main(int argc, char *argv[]);
|
||||||
#ifndef MAXPATHLEN
|
#ifndef MAXPATHLEN
|
||||||
#define MAXPATHLEN 256
|
#define MAXPATHLEN 256
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef MACOSX
|
||||||
|
#define DEFAULT_CONFIG_FILE "Library/Preferences/ScummVM Preferences"
|
||||||
|
#else
|
||||||
#define DEFAULT_CONFIG_FILE ".scummvmrc"
|
#define DEFAULT_CONFIG_FILE ".scummvmrc"
|
||||||
|
#endif
|
||||||
#else
|
#else
|
||||||
#define DEFAULT_CONFIG_FILE "scummvm.ini"
|
#define DEFAULT_CONFIG_FILE "scummvm.ini"
|
||||||
#endif
|
#endif
|
||||||
|
@ -153,9 +157,9 @@ int main(int argc, char *argv[])
|
||||||
sprintf(scummhome,"%s/%s", getenv("HOME"), DEFAULT_CONFIG_FILE);
|
sprintf(scummhome,"%s/%s", getenv("HOME"), DEFAULT_CONFIG_FILE);
|
||||||
else strcpy(scummhome,DEFAULT_CONFIG_FILE);
|
else strcpy(scummhome,DEFAULT_CONFIG_FILE);
|
||||||
#else
|
#else
|
||||||
char scummhome[255];
|
char scummhome[256];
|
||||||
#if defined (WIN32) && !defined(_WIN32_WCE)
|
#if defined (WIN32) && !defined(_WIN32_WCE)
|
||||||
GetWindowsDirectory(scummhome, 255);
|
GetWindowsDirectory(scummhome, 256);
|
||||||
strcat(scummhome, "\\");
|
strcat(scummhome, "\\");
|
||||||
strcat(scummhome, DEFAULT_CONFIG_FILE);
|
strcat(scummhome, DEFAULT_CONFIG_FILE);
|
||||||
#else
|
#else
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue