diff options
author | Steven Noonan <steven@uplinklabs.net> | 2009-09-25 19:39:53 -0700 |
---|---|---|
committer | Steven Noonan <steven@uplinklabs.net> | 2009-09-25 19:39:53 -0700 |
commit | 176d5bc49707560ad531942eefafd7ac9335e34c (patch) | |
tree | dd56fd97a9ff822bd5d318073fb2b783fd8e8232 /crawl-ref/source/initfile.cc | |
parent | 3fa08bdca8d74022a518ad931a92b18a8238943e (diff) | |
download | crawl-ref-176d5bc49707560ad531942eefafd7ac9335e34c.tar.gz crawl-ref-176d5bc49707560ad531942eefafd7ac9335e34c.zip |
initfile.cc: move 'saves' and 'morgue' to appropriate Mac locations on Mac OS X
The '~/Library/Application Support/<Application Name>' path is widely
used as a settings or save folder for Mac applications.
Signed-off-by: Steven Noonan <steven@uplinklabs.net>
Diffstat (limited to 'crawl-ref/source/initfile.cc')
-rw-r--r-- | crawl-ref/source/initfile.cc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/crawl-ref/source/initfile.cc b/crawl-ref/source/initfile.cc index ebcf184706..01145e7d6c 100644 --- a/crawl-ref/source/initfile.cc +++ b/crawl-ref/source/initfile.cc @@ -657,13 +657,17 @@ void game_options::reset_options() #if defined(SAVE_DIR_PATH) save_dir = SAVE_DIR_PATH "/saves/"; morgue_dir = SAVE_DIR_PATH "/morgue/"; +#elif defined(OSX) + std::string tmp_path_base = std::string(getenv("HOME")) + "/Library/Application Support/" CRAWL; + save_dir = tmp_path_base + "/saves/"; + morgue_dir = tmp_path_base + "/morgue/"; #elif !defined(DOS) save_dir = "saves/"; #else save_dir.clear(); #endif -#if !defined(SHORT_FILE_NAMES) && !defined(SAVE_DIR_PATH) +#if !defined(SHORT_FILE_NAMES) && !defined(SAVE_DIR_PATH) && !defined(OSX) morgue_dir = "morgue/"; #endif |