diff options
Diffstat (limited to 'crawl-ref/source/macro.cc')
-rw-r--r-- | crawl-ref/source/macro.cc | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/crawl-ref/source/macro.cc b/crawl-ref/source/macro.cc index 6a4783519f..2420971a40 100644 --- a/crawl-ref/source/macro.cc +++ b/crawl-ref/source/macro.cc @@ -175,11 +175,19 @@ static std::string get_macro_file() if (!dir.empty()) { +#ifndef DGL_MACRO_ABSOLUTE_PATH if (dir[dir.length() - 1] != FILE_SEPARATOR) dir += FILE_SEPARATOR; +#endif } - + +#if defined(DGL_MACRO_ABSOLUTE_PATH) + return (dir.empty()? "macro.txt" : dir); +#elif defined(DGL_NAMED_MACRO_FILE) + return (dir + strip_filename_unsafe_chars(you.your_name) + "-macro.txt"); +#else return (dir + "macro.txt"); +#endif } static void buf2keyseq(const char *buff, keyseq &k) |